From 624b3ebc18c668459930333eb623e0ed22740f04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Mon, 27 Nov 2017 18:47:19 -0500 Subject: [PATCH] Mark slow tests as such to reduce noise on test report --- test/plugins/auth/ldap.js | 2 ++ test/plugins/link.js | 2 ++ test/plugins/storage.js | 2 ++ test/server.js | 4 +++- test/tests/passwords.js | 2 ++ 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/test/plugins/auth/ldap.js b/test/plugins/auth/ldap.js index e14d9555..a52d7004 100644 --- a/test/plugins/auth/ldap.js +++ b/test/plugins/auth/ldap.js @@ -109,6 +109,8 @@ function testLdapAuth() { } describe("LDAP authentication plugin", function() { + this.slow(200); + before((done) => { this.server = startLdapServer(done); }); diff --git a/test/plugins/link.js b/test/plugins/link.js index 1f9e801f..f1c45699 100644 --- a/test/plugins/link.js +++ b/test/plugins/link.js @@ -7,6 +7,8 @@ const Helper = require("../../src/helper"); const link = require("../../src/plugins/irc-events/link.js"); describe("Link plugin", function() { + this.slow(200); + before(function(done) { this.app = util.createWebserver(); this.app.get("/real-test-image.png", function(req, res) { diff --git a/test/plugins/storage.js b/test/plugins/storage.js index b4c8e838..f8391f3f 100644 --- a/test/plugins/storage.js +++ b/test/plugins/storage.js @@ -9,6 +9,8 @@ const Helper = require("../../src/helper"); const link = require("../../src/plugins/irc-events/link.js"); describe("Image storage", function() { + this.slow(200); + const testImagePath = path.resolve(__dirname, "../../client/img/apple-touch-icon-120x120.png"); const correctImageHash = crypto.createHash("sha256").update(fs.readFileSync(testImagePath)).digest("hex"); const correctImageURL = `storage/${correctImageHash.substring(0, 2)}/${correctImageHash.substring(2, 4)}/${correctImageHash.substring(4)}.png`; diff --git a/test/server.js b/test/server.js index d417bc68..dfc05a02 100644 --- a/test/server.js +++ b/test/server.js @@ -41,7 +41,9 @@ describe("Server", () => { }); }); - describe("WebSockets", () => { + describe("WebSockets", function() { + this.slow(300); + let client; before((done) => { diff --git a/test/tests/passwords.js b/test/tests/passwords.js index a5c1fa96..8addd73c 100644 --- a/test/tests/passwords.js +++ b/test/tests/passwords.js @@ -4,6 +4,8 @@ const expect = require("chai").expect; const Helper = require("../../src/helper"); describe("Client passwords", function() { + this.slow(1500); + const inputPassword = "my$Super@Cool Password"; it("hashed password should match", function() {