Use assert in test

This commit is contained in:
Haidang666
2021-08-01 14:59:25 +07:00
parent 3368615a77
commit 85e78d2490
2 changed files with 9 additions and 4 deletions

View File

@@ -24,8 +24,9 @@ describe("getLockCategoriesByHash", () => {
it("Database should be greater or equal to version 20", async () => {
const version = (await db.prepare("get", "SELECT key, value FROM config where key = ?", ["version"])).value;
if (version >= 20) return;
else return `Version isn't greater than 20. Version is ${version}`;
assert(
version >= 20,
`Version isn't greater than 20. Version is ${version}`);
});
it("Should be able to get multiple locks in one object", (done: Done) => {