Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

remove unused interface tests (#4247)

Park Juhyung5bdc20815b5a
diff --git a/package-scripts.js b/package-scripts.js
index da7cb1c4..48856cdd 100644
--- a/package-scripts.js
+++ b/package-scripts.js
@@ -158,8 +158,6 @@ module.exports = {
only: {
default: {
script: `nps ${[
- 'test.node.only.bdd',
- 'test.node.only.tdd',
'test.node.only.bddRequire',
'test.node.only.globalBdd',
'test.node.only.globalTdd',
@@ -168,22 +166,6 @@ module.exports = {
description: 'Run Node.js "only" functionality tests',
hiddenFromHelp: true
},
- bdd: {
- script: test(
- 'only-bdd',
- '--ui bdd test/only/bdd.spec --no-parallel'
- ),
- description: 'Run Node.js "only" w/ BDD interface tests',
- hiddenFromHelp: true
- },
- tdd: {
- script: test(
- 'only-tdd',
- '--ui tdd test/only/tdd.spec --no-parallel'
- ),
- description: 'Run Node.js "only" w/ TDD interface tests',
- hiddenFromHelp: true
- },
bddRequire: {
script: test(
'only-bdd-require',
diff --git a/test/only/bdd.spec.js b/test/only/bdd.spec.js
deleted file mode 100644
index 8f38a9b7..00000000
--- a/test/only/bdd.spec.js
+++ /dev/null
@@ -1,127 +0,0 @@
-'use strict';
-
-describe('should only run .only test in this bdd suite', function() {
- it('should not run this test', function() {
- expect(0, 'to be', 1, 'this test should have been skipped');
- });
- it.only('should run this test', function() {
- expect(0, 'to be', 0, 'this .only test should run');
- });
- it('should run this test, not (includes the title of the .only test)', function() {
- expect(0, 'to be', 1, 'this test should have been skipped');
- });
-});
-
-describe('should not run this suite', function() {
- it('should not run this test', function() {
- expect(true, 'to be', false);
- });
-
- it('should not run this test', function() {
- expect(true, 'to be', false);
- });
-
- it('should not run this test', function() {
- expect(true, 'to be', false);
- });
-});
-
-describe.only('should run all tests in this bdd suite', function() {
- it('should run this test #1', function() {
- expect(true, 'to be', true);
- });
-
- it('should run this test #2', function() {
- expect(1, 'to be', 1);
- });
-
- it('should run this test #3', function() {
- expect('foo', 'to be', 'foo');
- });
-});
-
-describe('should run only suites that marked as `only`', function() {
- describe.only('should run all this tdd suite', function() {
- it('should run this test #1', function() {
- expect(true, 'to be', true);
- });
-
- it('should run this test #2', function() {
- expect(true, 'to be', true);
- });
- });
-
- describe('should not run this suite', function() {
- it('should run this test', function() {
- expect(true, 'to be', false);
- });
- });
-});
-
-// Nested situation
-describe('should not run parent tests', function() {
- it('should not run this test', function() {
- expect(true, 'to be', false);
- });
- describe('and not the child tests too', function() {
- it('should not run this test', function() {
- expect(true, 'to be', false);
- });
- describe.only('but run all the tests in this suite', function() {
- it('should run this test #1', function() {
- expect(true, 'to be', true);
- });
- it('should run this test #2', function() {
- expect(true, 'to be', true);
- });
- });
- });
-});
-
-// mark test as `only` override the suite behavior
-describe.only('should run only tests that marked as `only`', function() {
- it('should not run this test #1', function() {
- expect(false, 'to be', true);
- });
-
- it.only('should run this test #2', function() {
- expect(true, 'to be', true);
- });
-
- it('should not run this test #3', function() {
- expect(false, 'to be', true);
- });
-
- it.only('should run this test #4', function() {
- expect(true, 'to be', true);
- });
-});
-
-describe.only('Should run only test cases that mark as only', function() {
- it.only('should runt his test', function() {
- expect(true, 'to be', true);
- });
-
- it('should not run this test', function() {
- expect(false, 'to be', true);
- });
-
- describe('should not run this suite', function() {
- it('should not run this test', function() {
- expect(false, 'to be', true);
- });
- });
-});
-
-// Root Suite
-it.only('#Root-Suite, should run this test-case #1', function() {
- expect(true, 'to be', true);
-});
-
-it.only('#Root-Suite, should run this test-case #2', function() {
- expect(true, 'to be', true);
-});
-
-it('#Root-Suite, should not run this test', function() {
- expect(false, 'to be', true);
-});
diff --git a/test/only/qunit.spec.js b/test/only/qunit.spec.js
deleted file mode 100644
index 04a4a04c..00000000
--- a/test/only/qunit.spec.js
+++ /dev/null
@@ -1,75 +0,0 @@
-'use strict';
-
-// Root Suite
-test.only('#Root-Suite, should run this test-case #1', function() {
- expect(true, 'to be', true);
-});
-
-test.only('#Root-Suite, should run this test-case #2', function() {
- expect(true, 'to be', true);
-});
-
-test('#Root-Suite, should not run this test', function() {
- expect(false, 'to be', true);
-});
-
-suite('should only run .only test in this qunit suite');
-
-test('should not run this test', function() {
- expect(0, 'to be', 1, 'this test should have been skipped');
-});
-test.only('should run this test', function() {
- expect(0, 'to be', 0, 'this .only test should run');
-});
-test('should run this test, not (includes the title of the .only test)', function() {
- expect(0, 'to be', 1, 'this test should have been skipped');
-});
-
-// Mark suite
-suite.only('should run all tests in this suite');
-
-test('should run this test #1', function() {
- expect(true, 'to be', true);
-});
-
-test('should run this test #2', function() {
- expect(true, 'to be', true);
-});
-
-test('should run this test #3', function() {
- expect(true, 'to be', true);
-});
-
-// Unmark this suite
-suite("should not run any of this suite's tests");
-
-test('should not run this test', function() {
- expect(false, 'to be', true);
-});
-
-test('should not run this test', function() {
- expect(false, 'to be', true);
-});
-
-test('should not run this test', function() {
- expect(false, 'to be', true);
-});
-
-// Mark test as `only` override the suite behavior
-suite.only('should run only tests that marked as `only`');
-
-test('should not run this test #1', function() {
- expect(false, 'to be', true);
-});
-
-test.only('should not run this test #2', function() {
- expect(true, 'to be', true);
-});
-
-test('should not run this test #3', function() {
- expect(false, 'to be', true);
-});
-
-test.only('should not run this test #4', function() {
- expect(true, 'to be', true);
-});
diff --git a/test/only/tdd.spec.js b/test/only/tdd.spec.js
deleted file mode 100644
index eed4e27e..00000000
--- a/test/only/tdd.spec.js
+++ /dev/null
@@ -1,127 +0,0 @@
-'use strict';
-
-suite('should only run .only test in this tdd suite', function() {
- test('should not run this test', function() {
- expect(0, 'to be', 1, 'this test should have been skipped');
- });
- test.only('should run this test', function() {
- expect(0, 'to be', 0, 'this .only test should run');
- });
- test('should run this test, not (includes the title of the .only test)', function() {
- expect(0, 'to be', 1, 'this test should have been skipped');
- });
-});
-
-suite('should not run this suite', function() {
- test('should not run this test', function() {
- expect(true, 'to be', false);
- });
-
- test('should not run this test', function() {
- expect(true, 'to be', false);
- });
-
- test('should not run this test', function() {
- expect(true, 'to be', false);
- });
-});
-
-suite.only('should run all tests in this tdd suite', function() {
- test('should run this test #1', function() {
- expect(true, 'to be', true);
- });
-
- test('should run this test #2', function() {
- expect(1, 'to be', 1);
- });
-
- test('should run this test #3', function() {
- expect('foo', 'to be', 'foo');
- });
-});
-
-suite('should run only suites that marked as `only`', function() {
- suite.only('should run all this tdd suite', function() {
- test('should run this test #1', function() {
- expect(true, 'to be', true);
- });
-
- test('should run this test #2', function() {
- expect(true, 'to be', true);
- });
- });
-
- suite('should not run this suite', function() {
- test('should not run this test', function() {
- expect(true, 'to be', false);
- });
- });
-});
-
-// Nested situation
-suite('should not run parent tests', function() {
- test('should not run this test', function() {
- expect(true, 'to be', false);
- });
- suite('and not the child tests too', function() {
- test('should not run this test', function() {
- expect(true, 'to be', false);
- });
- suite.only('but run all the tests in this suite', function() {
- test('should run this test #1', function() {
- expect(true, 'to be', true);
- });
- test('should run this test #2', function() {
- expect(true, 'to be', true);
- });
- });
- });
-});
-
-// mark test as `only` override the suite behavior
-suite.only('should run only tests that marked as `only`', function() {
- test('should not run this test #1', function() {
- expect(false, 'to be', true);
- });
-
- test.only('should run this test #2', function() {
- expect(true, 'to be', true);
- });
-
- test('should not run this test #3', function() {
- expect(false, 'to be', true);
- });
-
- test.only('should run this test #4', function() {
- expect(true, 'to be', true);
- });
-});
-
-suite.only('Should run only test cases that mark as only', function() {
- test.only('should runt his test', function() {
- expect(true, 'to be', true);
- });
-
- test('should not run this test', function() {
- expect(false, 'to be', true);
- });
-
- suite('should not run this suite', function() {
- test('should not run this test', function() {
- expect(false, 'to be', true);
- });
- });
-});
-
-// Root Suite
-test.only('#Root-Suite, should run this test-case #1', function() {
- expect(true, 'to be', true);
-});
-
-test.only('#Root-Suite, should run this test-case #2', function() {
- expect(true, 'to be', true);
-});
-
-test('#Root-Suite, should not run this test', function() {
- expect(false, 'to be', true);
-});