From 7196ed20ae0c5ffe0beb7e2df3a4fcc007814566 Mon Sep 17 00:00:00 2001 From: Wildan Mubarok Date: Sat, 20 Jan 2018 06:01:41 +0700 Subject: [PATCH 1/3] Update babelrc.md Add more explanation for the difference between tests vs sources babel configuration. --- docs/recipes/babelrc.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/recipes/babelrc.md b/docs/recipes/babelrc.md index 2e2604fe2..fc6b9ec82 100644 --- a/docs/recipes/babelrc.md +++ b/docs/recipes/babelrc.md @@ -36,6 +36,8 @@ You can override the default Babel configuration AVA uses for test transpilation } ``` +Note that this only overrides babel for transpiling tests. If you have sources linked to a test, then you still need to add separate babel configuration for sources explained [here](#transpiling-sources). + ## Use Babel Polyfills AVA lets you write your tests using new JavaScript syntax, even on Node.js versions that otherwise wouldn't support it. However, it doesn't add or modify built-ins of your current environment. Using AVA would, for example, not provide modern features such as `Array.prototype.includes()` to an underlying Node.js 4 environment. From 1d0cd12f45eafd4e8300f3c1216785afe4c3bb9b Mon Sep 17 00:00:00 2001 From: Wildan Mubarok Date: Sat, 20 Jan 2018 07:52:56 +0700 Subject: [PATCH 2/3] Docs: Add clarification for different Babel config babel -> Babel. This is a revised PR from previous commit. --- docs/recipes/babelrc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/recipes/babelrc.md b/docs/recipes/babelrc.md index fc6b9ec82..19146bf15 100644 --- a/docs/recipes/babelrc.md +++ b/docs/recipes/babelrc.md @@ -36,7 +36,7 @@ You can override the default Babel configuration AVA uses for test transpilation } ``` -Note that this only overrides babel for transpiling tests. If you have sources linked to a test, then you still need to add separate babel configuration for sources explained [here](#transpiling-sources). +Note that this only overrides Babel for transpiling tests. If you have sources linked to a test, then you still need to add separate Babel configuration for sources explained [here](#transpiling-sources). ## Use Babel Polyfills From 5ffc8d9b3990162f73fefa29f94cc6bb5e0ecbaa Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Sun, 21 Jan 2018 15:13:42 +0000 Subject: [PATCH 3/3] Clarify that babel-register does not pick up on AVA's Babel config --- docs/recipes/babelrc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/recipes/babelrc.md b/docs/recipes/babelrc.md index 19146bf15..0a4073367 100644 --- a/docs/recipes/babelrc.md +++ b/docs/recipes/babelrc.md @@ -36,7 +36,7 @@ You can override the default Babel configuration AVA uses for test transpilation } ``` -Note that this only overrides Babel for transpiling tests. If you have sources linked to a test, then you still need to add separate Babel configuration for sources explained [here](#transpiling-sources). +Note that this only affects how AVA transpiles your tests. If you use `babel-register` you'll still need to add separate Babel configuration as explained [here](#transpiling-sources). ## Use Babel Polyfills