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

Function expect_ok

test/parallel/test-fs-utimes.js:62–71  ·  view source on GitHub ↗
(syscall, resource, err, atime, mtime, statSync)

Source from the content-addressed store, hash-verified

60}
61
62function expect_ok(syscall, resource, err, atime, mtime, statSync) {
63 const mtime_diff = check_mtime(resource, mtime, statSync);
64 assert(
65 // Check up to single-second precision.
66 // Sub-second precision is OS and fs dependent.
67 !err && (mtime_diff < 2) || err && err.code === 'ENOSYS',
68 `FAILED: expect_ok ${util.inspect(arguments)}
69 check_mtime: ${mtime_diff}`
70 );
71}
72
73function getExpectedMtime(mtime) {
74 // Negative numeric timestamps are normalized to "now" at call time.

Callers 2

runTestsFunction · 0.85
syncTestsFunction · 0.85

Calls 3

check_mtimeFunction · 0.85
inspectMethod · 0.80
assertFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…