2022-02-09 05:23:36 +00:00
|
|
|
'use strict';
|
2022-04-04 22:36:40 +00:00
|
|
|
const { ObjectAssign, ObjectDefineProperty } = primordials;
|
2024-03-19 15:38:17 +00:00
|
|
|
const { test, suite, before, after, beforeEach, afterEach } = require('internal/test_runner/harness');
|
2022-08-15 09:12:11 +00:00
|
|
|
const { run } = require('internal/test_runner/runner');
|
2022-02-09 05:23:36 +00:00
|
|
|
|
|
|
|
module.exports = test;
|
2022-08-15 09:12:11 +00:00
|
|
|
ObjectAssign(module.exports, {
|
|
|
|
after,
|
|
|
|
afterEach,
|
|
|
|
before,
|
|
|
|
beforeEach,
|
2024-03-19 15:38:17 +00:00
|
|
|
describe: suite,
|
|
|
|
it: test,
|
2022-08-15 09:12:11 +00:00
|
|
|
run,
|
2024-03-19 15:38:17 +00:00
|
|
|
suite,
|
2022-08-15 09:12:11 +00:00
|
|
|
test,
|
|
|
|
});
|
2022-04-04 22:36:40 +00:00
|
|
|
|
|
|
|
let lazyMock;
|
|
|
|
|
|
|
|
ObjectDefineProperty(module.exports, 'mock', {
|
|
|
|
__proto__: null,
|
|
|
|
configurable: true,
|
|
|
|
enumerable: true,
|
|
|
|
get() {
|
|
|
|
if (lazyMock === undefined) {
|
2023-06-22 04:01:52 +00:00
|
|
|
const { MockTracker } = require('internal/test_runner/mock/mock');
|
2022-04-04 22:36:40 +00:00
|
|
|
|
|
|
|
lazyMock = new MockTracker();
|
|
|
|
}
|
|
|
|
|
|
|
|
return lazyMock;
|
|
|
|
},
|
|
|
|
});
|