Skip to content

Commit cedb130

Browse files
authored
docs: update file commands examples using payload (#1980)
Co-authored-by: Ferran Llop <[email protected]>
1 parent fff8290 commit cedb130

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/docs/test-runner/commands.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,12 +412,15 @@ The file commands allow writing, reading and removing files. The specified path
412412
import { writeFile, readFile, removeFile } from '@web/test-runner-commands';
413413

414414
it('can use file commands', async () => {
415-
await writeFile('test-data/hello-world.txt', 'Hello world!');
415+
await writeFile({
416+
path: 'test-data/hello-world.txt',
417+
content: 'Hello world!',
418+
});
416419

417-
const content = await readFile('test-data/hello-world.txt');
420+
const content = await readFile({ path: 'test-data/hello-world.txt' });
418421
console.log(content); // 'Hello world!'
419422

420-
await removeFile('test-data/hello-world.txt');
423+
await removeFile({ path: 'test-data/hello-world.txt' });
421424
});
422425
```
423426

0 commit comments

Comments
 (0)