Skip to content

Commit 20bc781

Browse files
authoredAug 11, 2020
Use ESM syntax for ESM example
1 parent 43dda52 commit 20bc781

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎docs/recipes/es-modules.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ export default function sum(a, b) {
6565

6666
```js
6767
// test.js
68-
const test = require('ava');
69-
const sum = require('./sum');
68+
import test from 'ava';
69+
import sum from './sum';
7070

7171
test('2 + 2 = 4', t => {
7272
t.is(sum(2, 2), 4);

0 commit comments

Comments
 (0)
Please sign in to comment.