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

Function doReadWithEncoding

test/parallel/test-fs-promises-writefile.js:157–162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

155}
156
157async function doReadWithEncoding() {
158 const data = await fsPromises.readFile(dest, 'utf-8');
159 const syncData = fs.readFileSync(dest, 'utf-8');
160 assert.strictEqual(typeof data, 'string');
161 assert.deepStrictEqual(data, syncData);
162}
163
164(async () => {
165 await doWrite();

Callers 1

Calls 2

readFileMethod · 0.45
readFileSyncMethod · 0.45

Tested by

no test coverage detected