Merge pull request #2292 from thelounge/xpaw/tests
Fix lint issue on master; increase timeout globally on CI
This commit is contained in:
commit
fab237d373
@ -284,7 +284,7 @@ function emitPreview(client, msg, preview) {
|
|||||||
function getRequestHeaders(headers) {
|
function getRequestHeaders(headers) {
|
||||||
const formattedHeaders = {
|
const formattedHeaders = {
|
||||||
"User-Agent": "Mozilla/5.0 (compatible; The Lounge IRC Client; +https://github.com/thelounge/thelounge)",
|
"User-Agent": "Mozilla/5.0 (compatible; The Lounge IRC Client; +https://github.com/thelounge/thelounge)",
|
||||||
Accept: headers.accept || "*/*",
|
"Accept": headers.accept || "*/*",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (headers.language) {
|
if (headers.language) {
|
||||||
|
@ -73,16 +73,18 @@ describe("SQLite Message Storage", function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should store a message", function(done) {
|
it("should store a message", function(done) {
|
||||||
|
store.database.serialize(() => {
|
||||||
store.index("this-is-a-network-guid", "#ThisIsAChannel", new Msg({
|
store.index("this-is-a-network-guid", "#ThisIsAChannel", new Msg({
|
||||||
time: 123456789,
|
time: 123456789,
|
||||||
text: "Hello from sqlite world!",
|
text: "Hello from sqlite world!",
|
||||||
}));
|
}));
|
||||||
|
|
||||||
store.database.serialize(done);
|
done();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should retrieve previously stored message", function(done) {
|
it("should retrieve previously stored message", function(done) {
|
||||||
store.getMessages({
|
store.database.serialize(() => store.getMessages({
|
||||||
uuid: "this-is-a-network-guid",
|
uuid: "this-is-a-network-guid",
|
||||||
}, {
|
}, {
|
||||||
name: "#thisisaCHANNEL",
|
name: "#thisisaCHANNEL",
|
||||||
@ -96,7 +98,7 @@ describe("SQLite Message Storage", function() {
|
|||||||
expect(msg.time.getTime()).to.equal(123456789);
|
expect(msg.time.getTime()).to.equal(123456789);
|
||||||
|
|
||||||
done();
|
done();
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should close database", function(done) {
|
it("should close database", function(done) {
|
||||||
|
Loading…
Reference in New Issue
Block a user