From c511d005cba31ee43c5124bf14973790737436c0 Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Thu, 31 Oct 2019 11:15:32 +0100 Subject: [PATCH] test(testem): use custom test page with latest mocha --- test/mocha-testem.mustache | 20 ++++++++++++++++++++ test/padCharsEnd.js | 2 +- test/repeatStr.js | 2 +- test/replaceAll.js | 2 +- test/sign.js | 2 +- test/trimEnd.js | 2 +- test/trimStart.js | 2 +- test/trunc.js | 2 +- testem.json | 10 +--------- 9 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 test/mocha-testem.mustache diff --git a/test/mocha-testem.mustache b/test/mocha-testem.mustache new file mode 100644 index 0000000000..c6a39f83a1 --- /dev/null +++ b/test/mocha-testem.mustache @@ -0,0 +1,20 @@ + + + + Test'em + + + + + + + + +
+ + + diff --git a/test/padCharsEnd.js b/test/padCharsEnd.js index 952aa84cb0..9163be409f 100644 --- a/test/padCharsEnd.js +++ b/test/padCharsEnd.js @@ -70,7 +70,7 @@ describe('padCharsEnd', function() { }); context('padCharsEndStrInvoker', function() { - beforeEach(function() { + before(function() { if (RA.isNotFunction(String.prototype.padEnd)) { this.skip(); } diff --git a/test/repeatStr.js b/test/repeatStr.js index 8143b6c38f..7fc2764427 100644 --- a/test/repeatStr.js +++ b/test/repeatStr.js @@ -54,7 +54,7 @@ describe('repeatStr', function() { }); context('repeatStrInvoker', function() { - beforeEach(function() { + before(function() { if (RA.isNotFunction(String.prototype.repeat)) { this.skip(); } diff --git a/test/replaceAll.js b/test/replaceAll.js index 3afdf78886..dc5fae05df 100644 --- a/test/replaceAll.js +++ b/test/replaceAll.js @@ -50,7 +50,7 @@ describe('replaceAll', function() { }); context('replaceAllInvoker', function() { - beforeEach(function() { + before(function() { if (RA.isNotFunction(String.prototype.replaceAll)) { this.skip(); } diff --git a/test/sign.js b/test/sign.js index 4026bb9204..fccf103aed 100644 --- a/test/sign.js +++ b/test/sign.js @@ -87,7 +87,7 @@ describe('sign', function() { }); context('signPolyfill', function() { - beforeEach(function() { + before(function() { if (RA.isNotFunction(Math.sign)) { this.skip(); } diff --git a/test/trimEnd.js b/test/trimEnd.js index 17d8466294..de84cc942b 100644 --- a/test/trimEnd.js +++ b/test/trimEnd.js @@ -35,7 +35,7 @@ describe('trimEnd', function() { }); context('trimEndInvoker', function() { - beforeEach(function() { + before(function() { if (RA.isNotFunction(String.prototype.trimEnd)) { this.skip(); } diff --git a/test/trimStart.js b/test/trimStart.js index 7f5233a788..854103829b 100644 --- a/test/trimStart.js +++ b/test/trimStart.js @@ -38,7 +38,7 @@ describe('trimStart', function() { }); context('trimStartInvoker', function() { - beforeEach(function() { + before(function() { if (RA.isNotFunction(String.prototype.trimStart)) { this.skip(); } diff --git a/test/trunc.js b/test/trunc.js index 2aa47ff11f..f53323dff5 100644 --- a/test/trunc.js +++ b/test/trunc.js @@ -84,7 +84,7 @@ describe('trunc', function() { }); context('truncPolyfill', function() { - beforeEach(function() { + before(function() { if (RA.isNotFunction(Math.trunc)) { this.skip(); } diff --git a/testem.json b/testem.json index d0913d69a0..54d58e1142 100644 --- a/testem.json +++ b/testem.json @@ -1,13 +1,5 @@ { - "framework": "mocha", - "cwd": ".", - "src_files": [ - "src/*.js", - "test/*.js" - ], - "serve_files": [ - "tmp-test-bundle.js" - ], + "test_page": "./test/mocha-testem.mustache", "before_tests": "npm run test:bundle-create", "after_tests": "npm run test:bundle-clean" }