From 49046be3614a9cbeec14c22e9f2c50a69311fe14 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Fri, 9 Mar 2018 11:41:30 +0200 Subject: [PATCH] Try to fix sqlite test failing on CI randomly --- test/plugins/sqlite.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/plugins/sqlite.js b/test/plugins/sqlite.js index b5cbc52e..968cd46f 100644 --- a/test/plugins/sqlite.js +++ b/test/plugins/sqlite.js @@ -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) {