Skip to content

Commit

Permalink
fix: minor typos (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbynens committed Feb 9, 2022
1 parent 5fe7d98 commit 9b8cc01
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ npm install puppeteer --save

## Replay a recording stored in a file using Puppeteer

```ts
```js
import { createRunner, parse } from '@puppeteer/replay';
import fs from 'fs'
import fs from 'fs';

// Read recording for a file.
const recordingText = fs.readFileSync('./recording.json', 'utf-8');
// Validate the file using parse function.
const recordingText = fs.readFileSync('./recording.json', 'utf8');
// Validate & parse the file.
const recording = parse(JSON.parse(recordingText));
// Create a runner and execute the script.
const runner = await createRunner(recording);
Expand All @@ -39,7 +39,7 @@ await runner.run();

## Stringify a recording as a Puppeteer script

```ts
```js
import { stringify } from '@puppeteer/replay';

console.log(await stringify({
Expand Down

0 comments on commit 9b8cc01

Please sign in to comment.