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/acceptance/misc/only/bdd-require.spec.js')
-rw-r--r--tests/lib/mocha-3.1.2/test/acceptance/misc/only/bdd-require.spec.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/lib/mocha-3.1.2/test/acceptance/misc/only/bdd-require.spec.js b/tests/lib/mocha-3.1.2/test/acceptance/misc/only/bdd-require.spec.js
new file mode 100644
index 0000000000..14710c4cd2
--- /dev/null
+++ b/tests/lib/mocha-3.1.2/test/acceptance/misc/only/bdd-require.spec.js
@@ -0,0 +1,20 @@
+'use strict';
+
+/* jshint node: true */
+
+var mocha = require('../../../../lib/mocha');
+
+var beforeEach = mocha.beforeEach;
+var it = mocha.it;
+var describe = mocha.describe;
+
+describe('it.only via require("mocha")', function () {
+ beforeEach(function () {
+ this.didRunBeforeEach = true;
+ });
+ describe('nested within a describe/context', function () {
+ it.only('should run all enclosing beforeEach hooks', function () {
+ require('assert').equal(this.didRunBeforeEach, true);
+ });
+ });
+});