Skip to content

Commit

Permalink
Re-enable tests on old Node.js versions
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Nov 17, 2021
1 parent 7b2bdae commit 73968df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -146,7 +146,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 14, 12]
node-version: [16, 14, 12, 10, 8, 6]
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down
5 changes: 3 additions & 2 deletions jest.config.js
@@ -1,5 +1,6 @@
const supportsESM = parseInt(process.versions.node) >= 12;

// These tests files are directly importing `src` files rather than the compiled versions
const importsSrc = [
"packages/babel-parser/test/unit/tokenizer/types.js",
"packages/babel-parser/test/unit/util/identifier.js",
Expand All @@ -12,7 +13,7 @@ const importsSrc = [
];

module.exports = {
runner: "./test/jest-light-runner",
...(supportsESM && { runner: "./test/jest-light-runner" }),

collectCoverageFrom: [
"packages/*/src/**/*.{js,mjs,ts}",
Expand All @@ -36,7 +37,7 @@ module.exports = {
"<rootDir>/build/",
"<rootDir>/.history/", // local directory for VSCode Extension - https://marketplace.visualstudio.com/items?itemName=xyz.local-history
"_browser\\.js",
...importsSrc,
...(supportsESM ? importsSrc : []),
],
testEnvironment: "node",
setupFilesAfterEnv: ["<rootDir>/test/testSetupFile.js"],
Expand Down

0 comments on commit 73968df

Please sign in to comment.