diff --git a/docs/recipes/flow.md b/docs/recipes/flow.md index f94bf7e7f..d729182c9 100644 --- a/docs/recipes/flow.md +++ b/docs/recipes/flow.md @@ -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" + ] } } } @@ -87,7 +89,7 @@ class CustomError extends Error { } function myFunc() { - throw new CustomError(TypeError('🙈')); + throw new CustomError(new TypeError('🙈')); }; test('throws', t => { diff --git a/docs/recipes/typescript.md b/docs/recipes/typescript.md index 5c94749b2..29a1a283f 100644 --- a/docs/recipes/typescript.md +++ b/docs/recipes/typescript.md @@ -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'); }); ``` @@ -153,7 +153,7 @@ class CustomError extends Error { } function myFunc() { - throw new CustomError(TypeError('🙈')); + throw new CustomError(new TypeError('🙈')); }; test('throws', t => {