From 2b214ce5a39019c5889222943ae59afadfc29199 Mon Sep 17 00:00:00 2001 From: "JiaLi.Passion" Date: Sat, 24 Feb 2018 16:04:01 +0900 Subject: [PATCH] fix(test): fix mocha compatible issue --- .travis.yml | 3 ++- karma-build-sauce-selenium3-mocha.conf.js | 2 +- lib/mocha/mocha.ts | 3 --- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 55a77ad33..bbf1599f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,7 +38,8 @@ script: - node_modules/.bin/gulp test/node - node simple-server.js 2>&1> server.log& - node ./test/webdriver/test.sauce.js - - npm install jasmine@3.0.0 jasmine-core@3.0.0 + - npm install jasmine@3.0.0 jasmine-core@3.0.0 mocha@5.0.1 - npm run test:phantomjs-single - node_modules/.bin/karma start karma-dist-sauce-jasmine3.conf.js --single-run + - node_modules/.bin/karma start karma-build-sauce-selenium3-mocha.conf.js --single-run - node_modules/.bin/gulp test/node diff --git a/karma-build-sauce-selenium3-mocha.conf.js b/karma-build-sauce-selenium3-mocha.conf.js index 6eb77e97a..d23462147 100644 --- a/karma-build-sauce-selenium3-mocha.conf.js +++ b/karma-build-sauce-selenium3-mocha.conf.js @@ -8,5 +8,5 @@ module.exports = function (config) { require('./karma-dist-mocha.conf.js')(config); - require('./sauce-selenium3.conf')(config); + require('./sauce-selenium3.conf')(config, ['SL_IE9']); }; diff --git a/lib/mocha/mocha.ts b/lib/mocha/mocha.ts index f04fe5a8b..10156a82f 100644 --- a/lib/mocha/mocha.ts +++ b/lib/mocha/mocha.ts @@ -158,9 +158,6 @@ Mocha.Runner.prototype.run = function(fn: Function) { this.on('test', (e: any) => { - if (Zone.current !== rootZone) { - throw new Error('Unexpected zone: ' + Zone.current.name); - } testZone = rootZone.fork(new ProxyZoneSpec()); });