Skip to content

Commit

Permalink
fix(jest): use correct minimum jest version (#4851)
Browse files Browse the repository at this point in the history
* fix(jest): use correct minimum jest version

this commit updates the check for the minimum allowed version of jest
from v24.9.1 to v24.9.0. while working on the jest refactoring, it was
discovered that v24.9.1 does not exist, making it impossible for anyone
to use v24

* test(jest): add jest versions to component starter

this comit updates the component starter ci tests to run each version of
jest that we support

STENCIL-953
  • Loading branch information
rwaskiewicz authored Sep 27, 2023
1 parent 1a87136 commit 2f7fb88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/test-component-starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
jest: ['24', '25', '26', '27']
node: ['16', '18', '20']
os: ['ubuntu-latest', 'windows-latest']
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -85,6 +86,9 @@ jobs:
working-directory: ./tmp-component-starter
shell: bash

- name: Install Jest
run: npm install --dev-dependencies jest@${{ matrix.jest }} jest-cli@${{ matrix.jest }} @types/jest@${{ matrix.jest }}

- name: Build Starter Project
run: npm run build
working-directory: ./tmp-component-starter
Expand Down
2 changes: 1 addition & 1 deletion src/sys/node/node-sys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ export function createNodeSys(c: { process?: any; logger?: Logger } = {}): Compi

sys.lazyRequire = new NodeLazyRequire(nodeResolve, {
'@types/jest': { minVersion: '24.9.1', recommendedVersion: '27.0.3', maxVersion: '27.0.0' },
jest: { minVersion: '24.9.1', recommendedVersion: '27.0.3', maxVersion: '27.0.0' },
jest: { minVersion: '24.9.0', recommendedVersion: '27.0.3', maxVersion: '27.0.0' },
'jest-cli': { minVersion: '24.9.0', recommendedVersion: '27.4.5', maxVersion: '27.0.0' },
puppeteer: { minVersion: '10.0.0', recommendedVersion: '20' },
'puppeteer-core': { minVersion: '10.0.0', recommendedVersion: '20' },
Expand Down

0 comments on commit 2f7fb88

Please sign in to comment.