Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use Jest 27 #186

Merged
merged 3 commits into from Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/nodejs.yml
Expand Up @@ -17,7 +17,11 @@ jobs:
fail-fast: false
matrix:
node-version: [10.x, 12.x, 13.x, 14.x, 16.x]
jest-version: [24, 25, 26]
jest-version: [24, 25, 26, 27]
exclude:
# jest@27 doesn't support node@13
- node-version: 13.x
jest-version: 27
runs-on: ubuntu-latest

steps:
Expand All @@ -29,8 +33,8 @@ jobs:
cache: yarn
- name: install with jest v${{ matrix.jest-version }}
run: |
yarn
yarn add --dev jest@${{ matrix.jest-version }} babel-jest@${{ matrix.jest-version }}
yarn
- name: run tests
run: yarn test
test-os:
Expand Down
2 changes: 1 addition & 1 deletion __tests__/buildJsonResults.test.js
Expand Up @@ -278,7 +278,7 @@ describe('buildJsonResults', () => {

// Mock Date.now() to return a fixed later value
const startDate = new Date(multiProjectNoFailingTestsReport.startTime);
spyOn(Date, 'now').and.returnValue(startDate.getTime() + 1234);
jest.spyOn(Date, 'now').mockImplementation(() => startDate.getTime() + 1234);

jsonResults = buildJsonResults(multiProjectNoFailingTestsReport, '/',
Object.assign({}, constants.DEFAULT_OPTIONS, {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -24,7 +24,7 @@
"xml": "^1.0.1"
},
"devDependencies": {
"jest": "26.0.1",
"jest": "^27.2.3",
"libxmljs": "^0.19.7",
"slash": "^3.0.0"
}
Expand Down