@@ -4,7 +4,6 @@ import { describe, it } from 'node:test';
4
4
import assert from 'node:assert' ;
5
5
import { spawn } from 'node:child_process' ;
6
6
import { writeFileSync } from 'node:fs' ;
7
- import util from 'internal/util' ;
8
7
import tmpdir from '../common/tmpdir.js' ;
9
8
10
9
if ( common . isIBMi )
@@ -35,9 +34,7 @@ Object.entries(fixtureContent)
35
34
. forEach ( ( [ file , content ] ) => writeFileSync ( fixturePaths [ file ] , content ) ) ;
36
35
37
36
describe ( 'test runner watch mode with more complex setup' , ( ) => {
38
- // This test is failing and needs to be fixed
39
- // The expected behavior is that the test runner should re-run the appropriate tests when a shared dependency changes
40
- it . todo ( 'should re-run appropriate tests when dependencies change' , async ( ) => {
37
+ it ( 'should re-run appropriate tests when dependencies change' , async ( ) => {
41
38
// Start the test runner in watch mode
42
39
const child = spawn ( process . execPath ,
43
40
[ '--watch' , '--test' ] ,
@@ -46,10 +43,10 @@ describe('test runner watch mode with more complex setup', () => {
46
43
let currentRunOutput = '' ;
47
44
const testRuns = [ ] ;
48
45
49
- const firstRunCompleted = util . createDeferredPromise ( ) ;
50
- const secondRunCompleted = util . createDeferredPromise ( ) ;
51
- const thirdRunCompleted = util . createDeferredPromise ( ) ;
52
- const fourthRunCompleted = util . createDeferredPromise ( ) ;
46
+ const firstRunCompleted = Promise . withResolvers ( ) ;
47
+ const secondRunCompleted = Promise . withResolvers ( ) ;
48
+ const thirdRunCompleted = Promise . withResolvers ( ) ;
49
+ const fourthRunCompleted = Promise . withResolvers ( ) ;
53
50
54
51
child . stdout . on ( 'data' , ( data ) => {
55
52
const str = data . toString ( ) ;
0 commit comments