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/misc/only/bdd-require.spec.js')
-rw-r--r--tests/lib/mocha-3.1.0/test/acceptance/misc/only/bdd-require.spec.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/lib/mocha-3.1.0/test/acceptance/misc/only/bdd-require.spec.js b/tests/lib/mocha-3.1.0/test/acceptance/misc/only/bdd-require.spec.js
new file mode 100644
index 0000000000..516dad7afa
--- /dev/null
+++ b/tests/lib/mocha-3.1.0/test/acceptance/misc/only/bdd-require.spec.js
@@ -0,0 +1,18 @@
+/*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);
+ });
+ });
+});