Skip to content

Commit

Permalink
Minor tweaks to the Flow and TS recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Oct 15, 2018
1 parent a9758ee commit 1cc1bd5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docs/recipes/flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ We recommend you use AVA's built-in Babel pipeline to strip Flow type annotation
"ava": {
"babel": {
"testOptions": {
"plugins": ["@babel/plugin-transform-flow-strip-types"]
"plugins": [
"@babel/plugin-transform-flow-strip-types"
]
}
}
}
Expand Down Expand Up @@ -87,7 +89,7 @@ class CustomError extends Error {
}

function myFunc() {
throw new CustomError(TypeError('馃檲'));
throw new CustomError(new TypeError('馃檲'));
};

test('throws', t => {
Expand Down
4 changes: 2 additions & 2 deletions docs/recipes/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import test from 'ava';

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

test(async (t) => {
test(async t => {
t.is(await fn(), 'foo');
});
```
Expand Down Expand Up @@ -153,7 +153,7 @@ class CustomError extends Error {
}

function myFunc() {
throw new CustomError(TypeError('馃檲'));
throw new CustomError(new TypeError('馃檲'));
};

test('throws', t => {
Expand Down

0 comments on commit 1cc1bd5

Please sign in to comment.