Update tests to use promises

This commit is contained in:
Ajay Ramachandran
2021-03-01 21:37:35 -05:00
parent ff4af3786e
commit 46b42da5bd
19 changed files with 274 additions and 259 deletions

View File

@@ -4,8 +4,8 @@ import {db} from '../../src/databases/databases';
import {getHash} from '../../src/utils/getHash';
describe('getIsUserVIP', () => {
before(() => {
db.exec("INSERT INTO vipUsers (userID) VALUES ('" + getHash("supertestman") + "')");
before((done: Done) => {
db.prepare("run", "INSERT INTO vipUsers (userID) VALUES ('" + getHash("supertestman") + "')").then(done);
});
it('Should be able to get a 200', (done: Done) => {