MCPcopy Create free account
hub / github.com/nodejs/node / validateReadFileAbortLogicBefore

Function validateReadFileAbortLogicBefore

test/parallel/test-fs-promises-readfile.js:45–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43}
44
45function validateReadFileAbortLogicBefore() {
46 const signal = AbortSignal.abort();
47 assert.rejects(readFile(fn, { signal }), {
48 name: 'AbortError'
49 }).then(common.mustCall());
50}
51
52function validateReadFileAbortLogicDuring() {
53 const controller = new AbortController();

Callers 1

Calls 3

readFileFunction · 0.70
abortMethod · 0.65
thenMethod · 0.45

Tested by

no test coverage detected