Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@fatso83/run-in-mocha

fatso8322ISC1.0.4

Run a single test file programmatically from Node.

readme

run-in-mocha

Run a single test file in Mocha

Ask a test file to add its tests to Mocha and run itself

require("@fatso83/run-in-mocha")(__filename);

describe("a suite", function() {
  it("is a passing test", function() {
    // OK
  });

  it("is a failing test", function() {
    throw new Error("OMG, I failed!");
  });
});