MCPcopy Index your code
hub / github.com/nodejs/node / testCreate

Function testCreate

test/common/watch.js:202–221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

200 };
201
202 const testCreate = async () => {
203 await ran1.promise;
204 runs.push(currentRun);
205 currentRun = '';
206 const newFilePath = tmpdir.resolve(fileToCreate);
207
208 await performFileOperation(
209 () => writeFileSync(newFilePath, 'module.exports = {};'),
210 useRunApi,
211 );
212 await ran2.promise;
213
214 runs.push(currentRun);
215 child.kill();
216 await once(child, 'exit');
217
218 for (const run of runs) {
219 assertTestOutput(run, false);
220 }
221 };
222
223 action === 'update' && await testUpdate();
224 action === 'rename' && await testRename();

Callers 1

testRunnerWatchFunction · 0.85

Calls 7

performFileOperationFunction · 0.85
writeFileSyncFunction · 0.85
assertTestOutputFunction · 0.85
killMethod · 0.80
onceFunction · 0.50
pushMethod · 0.45
resolveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…