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

Function expectedError

test/parallel/test-fs-access.js:107–115  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

105
106{
107 function expectedError(err) {
108 assert.strictEqual(this, undefined);
109 if (hasWriteAccessForReadonlyFile) {
110 assert.ifError(err);
111 } else {
112 assert.notStrictEqual(err, null);
113 assert.strictEqual(err.path, readOnlyFile);
114 }
115 }
116 fs.access(readOnlyFile, fs.constants.W_OK, common.mustCall(expectedError));
117 fs.promises.access(readOnlyFile, fs.constants.W_OK)
118 .then(common.mustNotCall(), common.mustCall(expectedError))

Callers 4

test-fs-access.jsFile · 0.85
didStopFrontendProfileFunction · 0.85
didStopProfileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…