diff options
author | Matthieu Aubry <mattab@users.noreply.github.com> | 2017-04-26 09:52:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-26 09:52:46 +0300 |
commit | 317700513cc732bb2371edbe645555feadbbc545 (patch) | |
tree | efc28c578903563cd72d8436dbefcec32ab161c7 /tests/lib/mocha-3.1.0/test/acceptance/throw.spec.js | |
parent | bc8222d451337185db343486319af6782b009148 (diff) | |
parent | 199e43ef5809d09803416db72ce0ace6c9a4d895 (diff) |
Merge pull request #11651 from piwik/3.x-dev3.0.4-b1
Release Piwik 3.0.4-b1
Diffstat (limited to 'tests/lib/mocha-3.1.0/test/acceptance/throw.spec.js')
-rw-r--r-- | tests/lib/mocha-3.1.0/test/acceptance/throw.spec.js | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/tests/lib/mocha-3.1.0/test/acceptance/throw.spec.js b/tests/lib/mocha-3.1.0/test/acceptance/throw.spec.js deleted file mode 100644 index 46cfbad6ad..0000000000 --- a/tests/lib/mocha-3.1.0/test/acceptance/throw.spec.js +++ /dev/null @@ -1,108 +0,0 @@ -var Suite = require('../../lib/suite'); -var Test = require('../../lib/test'); -var Runner = require('../../lib/runner'); - -describe('a test that throws', function () { - var suite, runner; - - beforeEach(function(){ - suite = new Suite('Suite', 'root'); - runner = new Runner(suite); - }) - - describe('undefined', function (){ - it('should not pass if throwing sync and test is sync', function(done) { - var test = new Test('im sync and throw undefined sync', function(){ - throw undefined; - }); - suite.addTest(test); - runner = new Runner(suite); - runner.on('end', function(){ - expect(runner.failures).to.equal(1); - expect(test.state).to.equal('failed'); - done(); - }); - runner.run(); - }) - - it('should not pass if throwing sync and test is async', function(done){ - var test = new Test('im async and throw undefined sync', function(done2){ - throw undefined; - process.nexTick(done2); - }); - suite.addTest(test); - runner = new Runner(suite); - runner.on('end', function(){ - expect(runner.failures).to.equal(1); - expect(test.state).to.equal('failed'); - done(); - }); - runner.run(); - }); - - it('should not pass if throwing async and test is async', function(done){ - var test = new Test('im async and throw undefined async', function(done2){ - process.nexTick(function(){ - throw undefined; - done2(); - }); - }); - suite.addTest(test); - runner = new Runner(suite); - runner.on('end', function(){ - expect(runner.failures).to.equal(1); - expect(test.state).to.equal('failed'); - done(); - }); - runner.run(); - }) - }) - - describe('null', function (){ - it('should not pass if throwing sync and test is sync', function(done) { - var test = new Test('im sync and throw null sync', function(){ - throw null; - }); - suite.addTest(test); - runner = new Runner(suite); - runner.on('end', function(){ - expect(runner.failures).to.equal(1); - expect(test.state).to.equal('failed'); - done(); - }); - runner.run(); - }) - - it('should not pass if throwing sync and test is async', function(done){ - var test = new Test('im async and throw null sync', function(done2){ - throw null; - process.nexTick(done2); - }); - suite.addTest(test); - runner = new Runner(suite); - runner.on('end', function(){ - expect(runner.failures).to.equal(1); - expect(test.state).to.equal('failed'); - done(); - }); - runner.run(); - }); - - it('should not pass if throwing async and test is async', function(done){ - var test = new Test('im async and throw null async', function(done2){ - process.nexTick(function(){ - throw null; - done2(); - }); - }); - suite.addTest(test); - runner = new Runner(suite); - runner.on('end', function(){ - expect(runner.failures).to.equal(1); - expect(test.state).to.equal('failed'); - done(); - }); - runner.run(); - }) - }) -}) |