From 5edce1949c13b1fa79dd9675fcbac13e1f4963dc Mon Sep 17 00:00:00 2001 From: Peter Rust Date: Wed, 12 Jun 2019 12:05:37 -0700 Subject: [PATCH] Revert "Attempt at testing (failing due to uncaught exception)" This reverts commit 30c7ffb8005937707ee894623d28b054eb621fd8. --- karma.conf.js | 6 +---- .../uncaught-exception.spec.mjs | 27 ------------------- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 test/browser-specific/uncaught-exception.spec.mjs diff --git a/karma.conf.js b/karma.conf.js index a5e8d15973..b0c713856c 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -145,11 +145,7 @@ module.exports = config => { pattern: 'test/browser-specific/fixtures/esm.fixture.mjs', type: 'module' }, - {pattern: 'test/browser-specific/esm.spec.mjs', type: 'module'}, - { - pattern: 'test/browser-specific/uncaught-exception.spec.mjs', - type: 'module' - } + {pattern: 'test/browser-specific/esm.spec.mjs', type: 'module'} ]; break; default: diff --git a/test/browser-specific/uncaught-exception.spec.mjs b/test/browser-specific/uncaught-exception.spec.mjs deleted file mode 100644 index 54b852f875..0000000000 --- a/test/browser-specific/uncaught-exception.spec.mjs +++ /dev/null @@ -1,27 +0,0 @@ -import '/base/mocha.js'; - -var Mocha = window.Mocha; -var Suite = Mocha.Suite; -var Runner = Mocha.Runner; - -mocha.allowUncaught() - -it('should include the stack of uncaught exceptions', function(done) { - var suite = new Suite('Suite', 'root'); - var runner = new Runner(suite); - runner.allowUncaught = true; - var err; - runner.fail = function(e) { - err = e; - }; - - setTimeout(function throwTestError() { - throw new Error('test error'); - }, 1); - - setTimeout(function() { - expect(err, 'to be an', Error); - expect(err.stack, 'to contain', 'at throwTestError') - done(); - }, 2); -});