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

Function testPullSyncStart

test/parallel/test-fs-promises-file-handle-pullsync.js:305–316  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

303// =============================================================================
304
305async function testPullSyncStart() {
306 const filePath = path.join(tmpDir, 'pullsync-start.txt');
307 fs.writeFileSync(filePath, 'AAABBBCCC');
308
309 const fh = await open(filePath, 'r');
310 try {
311 const data = textSync(fh.pullSync({ start: 3 }));
312 assert.strictEqual(data, 'BBBCCC');
313 } finally {
314 await fh.close();
315 }
316}
317
318// =============================================================================
319// pullSync() with limit option

Calls 5

textSyncFunction · 0.85
openFunction · 0.70
closeMethod · 0.65
joinMethod · 0.45
writeFileSyncMethod · 0.45

Tested by

no test coverage detected