@reporters/mocha 1.3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +5 -8
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
/* eslint-disable class-methods-use-this */
|
|
2
2
|
/* eslint-disable no-underscore-dangle */
|
|
3
|
-
/* eslint-disable max-classes-per-file */
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const Mocha = require('mocha');
|
|
9
|
-
const { loadOptions } = require('mocha/lib/cli');
|
|
4
|
+
import { EventEmitter } from 'node:events';
|
|
5
|
+
import Mocha from 'mocha';
|
|
6
|
+
import { loadOptions } from 'mocha/lib/cli/options.js';
|
|
10
7
|
|
|
11
8
|
const {
|
|
12
9
|
EVENT_RUN_BEGIN,
|
|
@@ -309,7 +306,7 @@ class Runner extends EventEmitter {
|
|
|
309
306
|
}
|
|
310
307
|
}
|
|
311
308
|
|
|
312
|
-
|
|
309
|
+
export default async function mochaReporter(source) {
|
|
313
310
|
const runner = new Runner();
|
|
314
311
|
await runner.init();
|
|
315
312
|
|
|
@@ -329,4 +326,4 @@ module.exports = async function mochaReporter(source) {
|
|
|
329
326
|
}
|
|
330
327
|
|
|
331
328
|
runner.end();
|
|
332
|
-
}
|
|
329
|
+
}
|