()
| 166 | }; |
| 167 | |
| 168 | const testDelete = async () => { |
| 169 | await ran1.promise; |
| 170 | runs.push(currentRun); |
| 171 | currentRun = ''; |
| 172 | const fileToDeletePath = tmpdir.resolve(fileToUpdate); |
| 173 | |
| 174 | if (useRunApi) { |
| 175 | const { existsSync } = require('node:fs'); |
| 176 | const interval = setInterval(() => { |
| 177 | if (existsSync(fileToDeletePath)) { |
| 178 | unlinkSync(fileToDeletePath); |
| 179 | } else { |
| 180 | ran2.resolve(); |
| 181 | clearInterval(interval); |
| 182 | } |
| 183 | }, common.platformTimeout(1000)); |
| 184 | await ran2.promise; |
| 185 | } else { |
| 186 | unlinkSync(fileToDeletePath); |
| 187 | await setTimeout(common.platformTimeout(2000)); |
| 188 | ran2.resolve(); |
| 189 | } |
| 190 | |
| 191 | runs.push(currentRun); |
| 192 | child.kill(); |
| 193 | await once(child, 'exit'); |
| 194 | |
| 195 | assert.strictEqual(runs.length, 2); |
| 196 | |
| 197 | for (const run of runs) { |
| 198 | assert.doesNotMatch(run, /MODULE_NOT_FOUND/); |
| 199 | } |
| 200 | }; |
| 201 | |
| 202 | const testCreate = async () => { |
| 203 | await ran1.promise; |
no test coverage detected
searching dependent graphs…