Skip to content

Commit

Permalink
[Tests] run tests with core-js as well
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed May 7, 2021
1 parent 03769fe commit 9590e61
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .eslintrc
Expand Up @@ -14,5 +14,9 @@
"prefer-regex-literals": 0,
},
},
{
"files": "test-corejs.js",
"extends": "@ljharb/eslint-config/tests",
},
],
}
17 changes: 13 additions & 4 deletions .github/workflows/node-iojs.yml
Expand Up @@ -12,6 +12,7 @@ jobs:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
preset: 'iojs'

latest:
Expand All @@ -21,7 +22,11 @@ jobs:

strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.latest) }}
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
command:
- 'tests-only'
- 'test:corejs'

steps:
- uses: actions/checkout@v2
Expand All @@ -30,7 +35,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
skip-ls-check: true
- run: npm run tests-only
- run: npm run ${{ matrix.command }}
- uses: codecov/codecov-action@v1

minors:
Expand All @@ -42,7 +47,11 @@ jobs:

strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.minors) }}
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.minors) }}
command:
- 'tests-only'
- 'test:corejs'

steps:
- uses: actions/checkout@v2
Expand All @@ -51,7 +60,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
skip-ls-check: true
- run: npm run tests-only
- run: npm run ${{ matrix.command }}
- uses: codecov/codecov-action@v1

node:
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/node-zero.yml
Expand Up @@ -12,6 +12,7 @@ jobs:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
preset: '0.x'

stable:
Expand All @@ -21,7 +22,11 @@ jobs:

strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.stable) }}
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.stable) }}
command:
- 'tests-only'
- 'test:corejs'

steps:
- uses: actions/checkout@v2
Expand All @@ -31,7 +36,7 @@ jobs:
node-version: ${{ matrix.node-version }}
cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
skip-ls-check: true
- run: npm run tests-only
- run: npm run ${{ matrix.command }}
- uses: codecov/codecov-action@v1

unstable:
Expand All @@ -43,7 +48,11 @@ jobs:

strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.unstable) }}
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.unstable) }}
command:
- 'tests-only'
- 'test:corejs'

steps:
- uses: actions/checkout@v2
Expand All @@ -53,7 +62,7 @@ jobs:
node-version: ${{ matrix.node-version }}
cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
skip-ls-check: true
- run: npm run tests-only
- run: npm run ${{ matrix.command }}
- uses: codecov/codecov-action@v1

node:
Expand Down
3 changes: 2 additions & 1 deletion .nycrc
Expand Up @@ -4,6 +4,7 @@
"reporter": ["text-summary", "text", "html", "json"],
"exclude": [
"coverage",
"test"
"test",
"test-corejs.js"
]
}
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -12,9 +12,10 @@
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"pretest": "npm run lint",
"test": "npm run tests-only && npm run test:harmony",
"test": "npm run tests-only && npm run test:harmony && npm run test:corejs",
"tests-only": "nyc tape 'test/**/*.js'",
"test:harmony": "node --harmony --es-staging test",
"test:corejs": "nyc tape test-corejs.js",
"posttest": "aud --production",
"prelint": "npm run eccheck",
"lint": "eslint --ext=js,mjs .",
Expand Down Expand Up @@ -43,6 +44,7 @@
"@ljharb/eslint-config": "^17.6.0",
"aud": "^1.1.5",
"auto-changelog": "^2.2.1",
"core-js": "^3.12.0",
"eclint": "^2.8.1",
"eslint": "^7.25.0",
"foreach": "^2.0.5",
Expand Down
5 changes: 5 additions & 0 deletions test-corejs.js
@@ -0,0 +1,5 @@
'use strict';

require('core-js');

require('./test');

0 comments on commit 9590e61

Please sign in to comment.