Skip to content

Commit 84889a5

Browse files
committed
squash: adjust example
1 parent 9d86e22 commit 84889a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/common/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,15 +312,15 @@ Use of this function is encouraged for relevant regression tests and for new
312312
APIs that work with user-provided objects.
313313

314314
```mjs
315-
import { promises as fs } from 'node:fs';
315+
import { open } from 'node:fs/promises';
316316
import { mustNotMutate } from '../common/index.mjs';
317317

318318
const _mutableOptions = { length: 4, position: 8 };
319319
const options = mustNotMutate(_mutableOptions);
320320

321-
// In filehandle.read or filehandle.write attempt to mutate options will throw
321+
// In filehandle.read or filehandle.write, attempt to mutate options will throw
322322
// In the test code, options can still be mutated via _mutableOptions
323-
const fh = await fs.open('/path/to/file', 'r+');
323+
const fh = await open('/path/to/file', 'r+');
324324
const { buffer } = await fh.read(options);
325325
_mutableOptions.position = 4;
326326
await fh.write(buffer, options);

0 commit comments

Comments
 (0)