Skip to content

armgit / mocha

Public Imported from GitHub
0

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

489 B
Raw Blame
"use strict";

var mocha = require("../../lib/mocha.cjs");

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("node:assert").strictEqual(this.didRunBeforeEach, true);
    });
  });
});