Skip to content
Prev Previous commit
Next Next commit
test_runner: use common.spawnPromisified instead of child_process
  • Loading branch information
syi0808 committed Jul 21, 2024
commit 4d3247e20732f39def42d61ec53983fffb566408
5 changes: 2 additions & 3 deletions test/parallel/test-runner-mocking.js
Comment thread
syi0808 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';
const common = require('../common');
const child = require('child_process');
const assert = require('node:assert');
const { mock, test } = require('node:test');
const fixtures = require('../common/fixtures');
Expand Down Expand Up @@ -1057,8 +1056,8 @@ test('setter() fails if getter options is true', (t) => {
}, /The property 'options\.setter' cannot be used with 'options\.getter'/);
});

test.only('wrong import syntax should throw error after module mocking.', () => {
const { stdout, stderr } = child.spawnSync(
test('wrong import syntax should throw error after module mocking.', async () => {
const { stdout, stderr } = await common.spawnPromisified(
Comment thread
syi0808 marked this conversation as resolved.
Outdated
process.execPath,
[
'--experimental-test-module-mocks',
Expand Down