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.2/test/integration/only.spec.js')
-rw-r--r--tests/lib/mocha-3.1.2/test/integration/only.spec.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/lib/mocha-3.1.2/test/integration/only.spec.js b/tests/lib/mocha-3.1.2/test/integration/only.spec.js
new file mode 100644
index 0000000000..b37a4b263e
--- /dev/null
+++ b/tests/lib/mocha-3.1.2/test/integration/only.spec.js
@@ -0,0 +1,45 @@
+'use strict';
+
+var run = require('./helpers').runMochaJSON;
+var assert = require('assert');
+
+describe('.only()', function () {
+ describe('bdd', function () {
+ it('should run only tests that marked as `only`', function (done) {
+ run('options/only/bdd.fixture.js', ['--ui', 'bdd'], function (err, res) {
+ assert(!err);
+ assert.equal(res.stats.pending, 0);
+ assert.equal(res.stats.passes, 11);
+ assert.equal(res.stats.failures, 0);
+ assert.equal(res.code, 0);
+ done();
+ });
+ });
+ });
+
+ describe('tdd', function () {
+ it('should run only tests that marked as `only`', function (done) {
+ run('options/only/tdd.fixture.js', ['--ui', 'tdd'], function (err, res) {
+ assert(!err);
+ assert.equal(res.stats.pending, 0);
+ assert.equal(res.stats.passes, 8);
+ assert.equal(res.stats.failures, 0);
+ assert.equal(res.code, 0);
+ done();
+ });
+ });
+ });
+
+ describe('qunit', function () {
+ it('should run only tests that marked as `only`', function (done) {
+ run('options/only/qunit.fixture.js', ['--ui', 'qunit'], function (err, res) {
+ assert(!err);
+ assert.equal(res.stats.pending, 0);
+ assert.equal(res.stats.passes, 5);
+ assert.equal(res.stats.failures, 0);
+ assert.equal(res.code, 0);
+ done();
+ });
+ });
+ });
+});