Try to fix sqlite test failing on CI randomly

This commit is contained in:
Pavel Djundik 2018-03-09 11:41:30 +02:00
parent d66d5dc144
commit 49046be361

View File

@ -29,14 +29,18 @@ describe("SQLite Message Storage", function() {
});
});
it("should create database file", function() {
it("should create database file", function(done) {
expect(store.isEnabled).to.be.false;
expect(fs.existsSync(expectedPath)).to.be.false;
store.enable("testUser");
expect(store.isEnabled).to.be.true;
expect(fs.existsSync(expectedPath)).to.be.true;
store.database.serialize(() => {
expect(fs.existsSync(expectedPath)).to.be.true;
done();
});
});
it("should create tables", function(done) {