MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / runMocha

Function runMocha

tests/runner.js:44–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42}
43
44function runMocha() {
45 let ROOT = process.cwd();
46
47 /* SilentErrors are used to avoid unhelpful stack traces to users but they can hide the source of test failures in
48 reporter output */
49 process.env.SILENT_ERROR = 'verbose';
50
51 // ensure that at the end of every test, we are in the correct current
52 // working directory
53 mocha.suite.afterEach(function () {
54 expect(process.cwd()).to.equal(ROOT);
55 });
56
57 console.time('Mocha Tests Running Time');
58 mocha.run((failures) => {
59 console.timeEnd('Mocha Tests Running Time');
60
61 // eslint-disable-next-line n/no-process-exit
62 process.exit(failures);
63 });
64}
65
66Promise.resolve()
67 .then(() => runMocha())

Callers 1

runner.jsFile · 0.85

Calls 2

exitMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…