Skip to content

Commit 1cc1bd5

Browse files
committed
Minor tweaks to the Flow and TS recipe
1 parent a9758ee commit 1cc1bd5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

docs/recipes/flow.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ We recommend you use AVA's built-in Babel pipeline to strip Flow type annotation
1515
"ava": {
1616
"babel": {
1717
"testOptions": {
18-
"plugins": ["@babel/plugin-transform-flow-strip-types"]
18+
"plugins": [
19+
"@babel/plugin-transform-flow-strip-types"
20+
]
1921
}
2022
}
2123
}
@@ -87,7 +89,7 @@ class CustomError extends Error {
8789
}
8890

8991
function myFunc() {
90-
throw new CustomError(TypeError('🙈'));
92+
throw new CustomError(new TypeError('🙈'));
9193
};
9294

9395
test('throws', t => {

docs/recipes/typescript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import test from 'ava';
5151

5252
const fn = async () => Promise.resolve('foo');
5353

54-
test(async (t) => {
54+
test(async t => {
5555
t.is(await fn(), 'foo');
5656
});
5757
```
@@ -153,7 +153,7 @@ class CustomError extends Error {
153153
}
154154

155155
function myFunc() {
156-
throw new CustomError(TypeError('🙈'));
156+
throw new CustomError(new TypeError('🙈'));
157157
};
158158

159159
test('throws', t => {

0 commit comments

Comments
 (0)