From 1ddc617b7973ed37abf3075582f8437c192651dc Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sat, 24 Mar 2018 22:53:02 +0200 Subject: [PATCH 1/2] Fix lint issue --- src/plugins/irc-events/link.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/irc-events/link.js b/src/plugins/irc-events/link.js index 370d9ab4..aec71826 100644 --- a/src/plugins/irc-events/link.js +++ b/src/plugins/irc-events/link.js @@ -284,7 +284,7 @@ function emitPreview(client, msg, preview) { function getRequestHeaders(headers) { const formattedHeaders = { "User-Agent": "Mozilla/5.0 (compatible; The Lounge IRC Client; +https://github.com/thelounge/thelounge)", - Accept: headers.accept || "*/*", + "Accept": headers.accept || "*/*", }; if (headers.language) { From a222dc923776708744df4739a490191a45579de5 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sun, 25 Mar 2018 16:00:48 +0300 Subject: [PATCH 2/2] Ensure sqlite tests are serialized --- test/plugins/sqlite.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/test/plugins/sqlite.js b/test/plugins/sqlite.js index 9a79dc6c..0d6e33a8 100644 --- a/test/plugins/sqlite.js +++ b/test/plugins/sqlite.js @@ -73,16 +73,18 @@ describe("SQLite Message Storage", function() { }); it("should store a message", function(done) { - store.index("this-is-a-network-guid", "#ThisIsAChannel", new Msg({ - time: 123456789, - text: "Hello from sqlite world!", - })); + store.database.serialize(() => { + store.index("this-is-a-network-guid", "#ThisIsAChannel", new Msg({ + time: 123456789, + text: "Hello from sqlite world!", + })); - store.database.serialize(done); + done(); + }); }); it("should retrieve previously stored message", function(done) { - store.getMessages({ + store.database.serialize(() => store.getMessages({ uuid: "this-is-a-network-guid", }, { name: "#thisisaCHANNEL", @@ -96,7 +98,7 @@ describe("SQLite Message Storage", function() { expect(msg.time.getTime()).to.equal(123456789); done(); - }); + })); }); it("should close database", function(done) {