You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ra...@apache.org on 2020/08/04 02:07:26 UTC
[incubator-annotator] 03/07: Target the current node version for
running tests
This is an automated email from the ASF dual-hosted git repository.
randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit e81082e8f704e2b0e3516765d10f48a449b41b71
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Mon Aug 3 19:00:55 2020 -0700
Target the current node version for running tests
Tell Babel to use the current node version when building for tests. This
change eliminates the rewriting used to support asynchronous generators
on other target environments, greatly cleaning up stack traces when
running tests.
---
babel.config.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/babel.config.js b/babel.config.js
index 5d5dea8..21401f2 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -29,7 +29,7 @@ module.exports = (api) => {
// Transform module syntax if necessary.
modules: CJS || TEST ? 'commonjs' : false,
// Set target environment to default browsers.
- targets: 'defaults',
+ targets: TEST ? { node: 'current' } : 'defaults',
};
// Options for the @babel/typescript preset.