-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Socket Command and starting db tests
- Loading branch information
1 parent
67b66b8
commit ff2acc8
Showing
4 changed files
with
163 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import assert from "assert"; | ||
import db from "../src/db/db"; | ||
describe("DataBase", () => { | ||
describe("Add User", () => { | ||
it("should add a user successfully", async () => { | ||
const ip = "192.168.1.1"; | ||
const username = "testuser"; | ||
const password = "secretpassword"; | ||
const hostname = "myhost"; | ||
const domain = "example.com"; | ||
|
||
const result = await db.addUser(ip, username, password, hostname, domain); | ||
|
||
assert.ok(result); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.