Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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.js108
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();
- })
- })
-})