Skip to content

Commit

Permalink
Merge 8d51a1c into f66c5fe
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Jul 15, 2018
2 parents f66c5fe + 8d51a1c commit 8a6fab2
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 19 deletions.
3 changes: 2 additions & 1 deletion test/404_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ describe('404', () => {
done();
});

it('valid html', (done) => {
it('valid html', function(done) {
this.timeout(helpers.TESTS_TIMEOUT);
helpers.assert.validHTML(response, done);
});

Expand Down
3 changes: 2 additions & 1 deletion test/about_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ describe('About', () => {
helpers.assert.itWorks(response.statusCode, done);
});

it('valid html', (done) => {
it('valid html', function(done) {
this.timeout(helpers.TESTS_TIMEOUT);
helpers.assert.validHTML(response, done);
});

Expand Down
3 changes: 2 additions & 1 deletion test/books_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ describe('books', () => {
helpers.assert.itWorks(response.statusCode, done);
});

it('valid html', (done) => {
it('valid html', function(done) {
this.timeout(helpers.TESTS_TIMEOUT);
helpers.assert.validHTML(response, done);
});

Expand Down
3 changes: 2 additions & 1 deletion test/bootlint_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ describe('bootlint', () => {
done();
});

it('valid html', (done) => {
it('valid html', function(done) {
this.timeout(helpers.TESTS_TIMEOUT);
helpers.assert.validHTML(response, done);
});

Expand Down
3 changes: 2 additions & 1 deletion test/bootstrap_legacy_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ describe('legacy/bootstrap', () => {
helpers.assert.itWorks(response.statusCode, done);
});

it('valid html', (done) => {
it('valid html', function(done) {
this.timeout(helpers.TESTS_TIMEOUT);
helpers.assert.validHTML(response, done);
});

Expand Down
3 changes: 2 additions & 1 deletion test/bootswatch4_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ describe('bootswatch4', () => {
helpers.assert.itWorks(response.statusCode, done);
});

it('valid html', (done) => {
it('valid html', function(done) {
this.timeout(helpers.TESTS_TIMEOUT);
helpers.assert.validHTML(response, done);
});

Expand Down
3 changes: 2 additions & 1 deletion test/bootswatch_legacy_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ describe('bootswatch3', () => {
helpers.assert.itWorks(response.statusCode, done);
});

it('valid html', (done) => {
it('valid html', function(done) {
this.timeout(helpers.TESTS_TIMEOUT);
helpers.assert.validHTML(response, done);
});

Expand Down
3 changes: 2 additions & 1 deletion test/fontawesome_legacy_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ describe('legacy/fontawesome', () => {
helpers.assert.itWorks(response.statusCode, done);
});

it('valid html', (done) => {
it('valid html', function(done) {
this.timeout(helpers.TESTS_TIMEOUT);
helpers.assert.validHTML(response, done);
});

Expand Down
3 changes: 2 additions & 1 deletion test/fontawesome_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ describe('fontawesome', () => {
done();
});

it('valid html', (done) => {
it('valid html', function(done) {
this.timeout(helpers.TESTS_TIMEOUT);
helpers.assert.validHTML(response, done);
});

Expand Down
3 changes: 2 additions & 1 deletion test/index_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ describe('index', () => {
done();
});

it('valid html', (done) => {
it('valid html', function(done) {
this.timeout(helpers.TESTS_TIMEOUT);
helpers.assert.validHTML(response, done);
});

Expand Down
3 changes: 2 additions & 1 deletion test/integrations_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ describe('integrations', () => {
helpers.assert.itWorks(response.statusCode, done);
});

it('valid html', (done) => {
it('valid html', function(done) {
this.timeout(helpers.TESTS_TIMEOUT);
helpers.assert.validHTML(response, done);
});

Expand Down
3 changes: 2 additions & 1 deletion test/jobs_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ describe('jobs', () => {
helpers.assert.itWorks(response.statusCode, done);
});

it('valid html', (done) => {
it('valid html', function(done) {
this.timeout(helpers.TESTS_TIMEOUT);
helpers.assert.validHTML(response, done);
});

Expand Down
3 changes: 1 addition & 2 deletions test/mocha.opts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
--check-leaks
--globals __core-js_shared__
--reporter dot
--slow 500
--throw-deprecation
--timeout 15000
--timeout 3000
--trace-deprecation
--trace-warnings
--use_strict
3 changes: 2 additions & 1 deletion test/privacy_policy_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ describe('privacy-policy', () => {
helpers.assert.itWorks(response.statusCode, done);
});

it('valid html', (done) => {
it('valid html', function(done) {
this.timeout(helpers.TESTS_TIMEOUT);
helpers.assert.validHTML(response, done);
});

Expand Down
3 changes: 2 additions & 1 deletion test/showcase_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ describe('showcase', () => {
helpers.assert.itWorks(response.statusCode, done);
});

it('valid html', (done) => {
it('valid html', function(done) {
this.timeout(helpers.TESTS_TIMEOUT);
helpers.assert.validHTML(response, done);
});

Expand Down
7 changes: 6 additions & 1 deletion test/test_helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ const validator = require('html-validator');
const app = require('../app.js');
const config = require('../config');

// This is our custom tests timeout;
// used in HTML validation tests and the server.close function
const TESTS_TIMEOUT = 5000;

// The server object holds the server instance across all tests;
// We start it in the first test and close it in the last one,
// otherwise test time increases a lot (more than 3x)
Expand Down Expand Up @@ -212,5 +216,6 @@ module.exports = {
pug: jsJade,
html: jsHTML,
haml: jsHAML
}
},
TESTS_TIMEOUT
};
6 changes: 4 additions & 2 deletions test/themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ describe('themes', () => {
});
});

after((done) => {
after(function(done) {
this.timeout(helpers.TESTS_TIMEOUT);
helpers.stopServer(done);
});

it('works', (done) => {
helpers.assert.itWorks(response.statusCode, done);
});

it('valid html', (done) => {
it('valid html', function(done) {
this.timeout(helpers.TESTS_TIMEOUT);
helpers.assert.validHTML(response, done);
});

Expand Down

0 comments on commit 8a6fab2

Please sign in to comment.