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

bdd-require.spec.js « only « misc « acceptance « test « mocha-3.1.0 « lib « tests - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 516dad7afad05c7b73bcb46dca3f258aae763def (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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);
    });
  });
});