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

Merge support jest 26 #1602

Merged
merged 2 commits into from May 6, 2020
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
6 changes: 3 additions & 3 deletions .travis.yml
Expand Up @@ -3,7 +3,7 @@ language: node_js
jobs:
include:
- os: windows
node_js: 8
node_js: 10
env: TS_JEST_E2E_WORKDIR=\%APPDATA%\ts-jest-e2e-workdir TS_JEST_E2E_OPTIMIZATIONS=1
cache:
npm: true
Expand All @@ -14,7 +14,7 @@ jobs:
- npm run clean -- --when-ci-commit-message
- npm run test:unit -- --runInBand
- os: windows
node_js: 12
node_js: 14
env: TS_JEST_E2E_WORKDIR=\%APPDATA%\ts-jest-e2e-workdir TS_JEST_E2E_OPTIMIZATIONS=1
cache:
npm: true
Expand All @@ -27,7 +27,7 @@ jobs:
- npm run clean -- --when-ci-commit-message
- npm run test:external-repos
- os: linux
node_js: 10
node_js: 12
env: TS_JEST_E2E_WORKDIR=/tmp/ts-jest-e2e-workdir TS_JEST_E2E_OPTIMIZATIONS=1
before_install:
# Disabled, randomly works :-/
Expand Down
2 changes: 1 addition & 1 deletion e2e/__external-repos__/custom-typings/package.json
Expand Up @@ -10,7 +10,7 @@
"devDependencies": {
"@types/jest": "^25.2.1",
"@types/jquery": "^3.3.35",
"jest": "^25.4.0",
"jest": "^26.0.1",
"typescript": "^3.8.3"
}
}
Expand Up @@ -7,7 +7,7 @@
"devDependencies": {
"@types/jest": "^25.2.1",
"@types/lodash": "^4.14.116",
"jest": "^25.4.0",
"jest": "^26.0.1",
"typescript": "^3.8.3"
}
}
2 changes: 1 addition & 1 deletion e2e/__external-repos__/simple/with-dependency/package.json
Expand Up @@ -41,7 +41,7 @@
"dependencies": {
"@types/jest": "^25.2.1",
"dependency": "file:../dependency",
"jest": "^25.4.0"
"jest": "^26.0.1"
},
"main": "./index.ts"
}
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@types/jest": "^25.2.1",
"jest": "^25.4.0",
"jest": "^26.0.1",
"typescript": "~3.8.3"
}
}
Expand Up @@ -2,4 +2,4 @@
"name": "@workspace-composite/my-library",
"version": "1.0.0",
"private": true
}
}
4 changes: 2 additions & 2 deletions e2e/__helpers__/test-case/utils.ts
Expand Up @@ -28,13 +28,13 @@ export function normalizeJestOutput(output: string): string {
let out: string = output
.trim()
// removes total and estimated times
.replace(/^(\s*Time\s*:\s*)[\d.]+m?s(?:(,\s*estimated\s+)[\d.]+m?s)?$/gm, (_, start) => `${start}XXs`)
.replace(/^(\s*Time\s*:\s*)[\d.]+ m?s(?:(,\s*estimated\s+)[\d.]+ m?s)?$/gm, (_, start) => `${start}XXs`)
// remove times after PASS/FAIL path/to/file (xxxs)
.replace(/^\s*((?:PASS|FAIL) .+) \([\d.]+m?s\)$/gm, (_, start) => `${start}`)
// removes each test time values
.replace(
// eslint-disable-next-line no-useless-escape
/^(\s*)(✕|×|✓|√)(\s+[^\(]+)(\s+\([\d.]+m?s\))?$/gm,
/^(\s*)(✕|×|✓|√)(\s+[^\(]+)(\s+\([\d.]+ m?s\))?$/gm,
(_, start, mark, mid /* , time */) => `${start}${normalizeTestMark(mark)}${mid}`,
)
// TODO: improves this...
Expand Down