Skip to content

Commit 23b7741

Browse files
ahnpnlmurbanowicz
andauthored
feat: support Jest v26 (#1602)
Co-authored-by: Marek Urbanowicz <marek@urbanowicz.dev>
1 parent ffe96c4 commit 23b7741

45 files changed

Lines changed: 9195 additions & 3743 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ language: node_js
33
jobs:
44
include:
55
- os: windows
6-
node_js: 8
6+
node_js: 10
77
env: TS_JEST_E2E_WORKDIR=\%APPDATA%\ts-jest-e2e-workdir TS_JEST_E2E_OPTIMIZATIONS=1
88
cache:
99
npm: true
@@ -14,7 +14,7 @@ jobs:
1414
- npm run clean -- --when-ci-commit-message
1515
- npm run test:unit -- --runInBand
1616
- os: windows
17-
node_js: 12
17+
node_js: 14
1818
env: TS_JEST_E2E_WORKDIR=\%APPDATA%\ts-jest-e2e-workdir TS_JEST_E2E_OPTIMIZATIONS=1
1919
cache:
2020
npm: true
@@ -27,7 +27,7 @@ jobs:
2727
- npm run clean -- --when-ci-commit-message
2828
- npm run test:external-repos
2929
- os: linux
30-
node_js: 10
30+
node_js: 12
3131
env: TS_JEST_E2E_WORKDIR=/tmp/ts-jest-e2e-workdir TS_JEST_E2E_OPTIMIZATIONS=1
3232
before_install:
3333
# Disabled, randomly works :-/

e2e/__external-repos__/custom-typings/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"devDependencies": {
1111
"@types/jest": "^25.2.1",
1212
"@types/jquery": "^3.3.35",
13-
"jest": "^25.4.0",
13+
"jest": "^26.0.1",
1414
"typescript": "^3.8.3"
1515
}
1616
}

e2e/__external-repos__/simple-project-references/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"devDependencies": {
88
"@types/jest": "^25.2.1",
99
"@types/lodash": "^4.14.116",
10-
"jest": "^25.4.0",
10+
"jest": "^26.0.1",
1111
"typescript": "^3.8.3"
1212
}
1313
}

e2e/__external-repos__/simple/with-dependency/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"dependencies": {
4242
"@types/jest": "^25.2.1",
4343
"dependency": "file:../dependency",
44-
"jest": "^25.4.0"
44+
"jest": "^26.0.1"
4545
},
4646
"main": "./index.ts"
4747
}

e2e/__external-repos__/yarn-workspace-composite/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"devDependencies": {
1212
"@types/jest": "^25.2.1",
13-
"jest": "^25.4.0",
13+
"jest": "^26.0.1",
1414
"typescript": "~3.8.3"
1515
}
1616
}

e2e/__external-repos__/yarn-workspace-composite/packages/my-library/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"name": "@workspace-composite/my-library",
33
"version": "1.0.0",
44
"private": true
5-
}
5+
}

e2e/__helpers__/test-case/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ export function normalizeJestOutput(output: string): string {
2828
let out: string = output
2929
.trim()
3030
// removes total and estimated times
31-
.replace(/^(\s*Time\s*:\s*)[\d.]+m?s(?:(,\s*estimated\s+)[\d.]+m?s)?$/gm, (_, start) => `${start}XXs`)
31+
.replace(/^(\s*Time\s*:\s*)[\d.]+ m?s(?:(,\s*estimated\s+)[\d.]+ m?s)?$/gm, (_, start) => `${start}XXs`)
3232
// remove times after PASS/FAIL path/to/file (xxxs)
3333
.replace(/^\s*((?:PASS|FAIL) .+) \([\d.]+m?s\)$/gm, (_, start) => `${start}`)
3434
// removes each test time values
3535
.replace(
3636
// eslint-disable-next-line no-useless-escape
37-
/^(\s*)(|×||)(\s+[^\(]+)(\s+\([\d.]+m?s\))?$/gm,
37+
/^(\s*)(|×||)(\s+[^\(]+)(\s+\([\d.]+ m?s\))?$/gm,
3838
(_, start, mark, mid /* , time */) => `${start}${normalizeTestMark(mark)}${mid}`,
3939
)
4040
// TODO: improves this...

0 commit comments

Comments
 (0)