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

migrate comparison tests to Jest snapshot tests #1161

Closed
wants to merge 69 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
eba25c0
add snapshot for one case
g-plane Jul 17, 2020
b47d60f
force color
g-plane Jul 17, 2020
d1c0632
fix linebreak and path separator on Windows
g-plane Jul 17, 2020
5b54894
fix linebreak and path separator on Windows
g-plane Jul 17, 2020
aed39cd
skip directories which have snapshots
g-plane Jul 17, 2020
d685fbf
clean up
g-plane Jul 17, 2020
37c1d4f
make snapshot: node
g-plane Jul 17, 2020
5842d95
make snapshot: nodeResolution
g-plane Jul 17, 2020
b4b12e4
make snapshot: nolib
g-plane Jul 17, 2020
2bba2d3
make snapshot: es3
g-plane Jul 17, 2020
3ffb146
make snapshot: es5
g-plane Jul 17, 2020
ee9ab75
tweak Jest
g-plane Jul 17, 2020
0caeb51
make snapshot: es6
g-plane Jul 17, 2020
aa92a60
make snapshot: es6codeSplitting
g-plane Jul 17, 2020
9fe98bb
fix spaces
g-plane Jul 17, 2020
6175ba6
make snapshot: es6withCJS
g-plane Jul 17, 2020
948c50e
fix snapshot: nodeResolution
g-plane Jul 18, 2020
becda03
fix spaces
g-plane Jul 18, 2020
e3dd326
make snapshot: externals
g-plane Jul 18, 2020
82f903a
use async fs API
g-plane Jul 18, 2020
dad9f0f
make snapshot: html-webpack-plugin
g-plane Jul 18, 2020
0500927
use async fs API
g-plane Jul 18, 2020
8afd421
make snapshot: issue71
g-plane Jul 18, 2020
3851275
make snapshot: importsWatch
g-plane Jul 19, 2020
455eaaf
fix snapshot: importsWatch
g-plane Jul 20, 2020
165ded3
skip lib check
g-plane Jul 20, 2020
cac76d4
fix
g-plane Jul 20, 2020
729b59b
make snapshot: declarationWatch
g-plane Jul 20, 2020
3d8fa62
increase timeout limitation
g-plane Jul 20, 2020
5f83f00
make snapshot: ignoreDiagnostics
g-plane Jul 20, 2020
983a94a
make snapshot: instance
g-plane Jul 20, 2020
c5a6162
fix snapshot: instance
g-plane Jul 20, 2020
edaab20
fix snapshot: instance
g-plane Jul 20, 2020
400fdb2
make snapshot: issue372
g-plane Jul 20, 2020
4a4874f
make snapshot: aliasResolution
g-plane Jul 20, 2020
929a763
simplify paths by specifying context
g-plane Jul 21, 2020
b8c10ed
make snapshot: localTsImplementationOfTypings
g-plane Jul 21, 2020
18b517f
fix path separator
g-plane Jul 21, 2020
954e3b2
add retries
g-plane Jul 21, 2020
53e1ddd
make snapshot: issue441
g-plane Jul 21, 2020
4f030f0
make snapshot: allowJs-entryFileIsJs
g-plane Jul 21, 2020
7d5c930
make snapshot: allowJs-ts-check
g-plane Jul 21, 2020
3b0b5ec
make snapshot: appendSuffixTo
g-plane Jul 21, 2020
355764a
make snapshot: errors
g-plane Jul 22, 2020
6509b04
refactor watch build
g-plane Jul 22, 2020
9d84e9b
tweak jest config
g-plane Jul 25, 2020
148c434
tweak watch build
g-plane Jul 25, 2020
12b1a73
tweak Jest config
g-plane Jul 25, 2020
0bd51cf
add script
g-plane Jul 25, 2020
c2fb7dc
add missing CLI argument
g-plane Jul 26, 2020
e20ebb1
fix timer
g-plane Jul 29, 2020
132f408
remove windows tests script
g-plane Jul 29, 2020
5eb48c0
tweak
g-plane Jul 29, 2020
71d5092
tweak timers
g-plane Jul 30, 2020
f0e5bc7
tweak timers
g-plane Jul 30, 2020
5d3e4c8
update ci
g-plane Jul 30, 2020
59f3a61
tweak timers
g-plane Jul 30, 2020
4a832af
tweak ci
g-plane Jul 30, 2020
d380637
make snapshot: babel-es6resolveParent
g-plane Jul 30, 2020
add7f37
increase test timeout
g-plane Jul 30, 2020
aaf2dbf
make snapshot: babel-issue81
g-plane Jul 30, 2020
41c98f3
make snapshot: babel-issue92
g-plane Jul 30, 2020
0801a79
increase retry times
g-plane Aug 1, 2020
95c77c6
make snapshot: appendSuffixToWatch
g-plane Aug 1, 2020
29f1c9c
make snapshot: basic
g-plane Aug 1, 2020
1a7bd51
allow to customize timeout for each test
g-plane Aug 1, 2020
15d76ab
remove unnecessary CI step
g-plane Aug 1, 2020
2aaffbc
revert
g-plane Aug 2, 2020
b14289a
increase retry times
g-plane Aug 14, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- name: build
run: yarn build

- name: install typescript
run: yarn add typescript@3.9.3
- name: snapshot test
run: yarn jest --color --testTimeout=8000

- name: test
run: sudo yarn comparison-tests
Expand All @@ -43,8 +43,8 @@ jobs:
run: yarn build
working-directory: C:\source\ts-loader

- name: install typescript
run: yarn add typescript@3.9.3
- name: snapshot test
run: yarn jest --color --testTimeout=8000 --testPathIgnorePatterns=issue441 --maxWorkers=1
working-directory: C:\source\ts-loader

- name: test
Expand Down
14 changes: 14 additions & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"preset": "ts-jest",
"testRunner": "jest-circus/runner",
"testEnvironment": "node",
"modulePathIgnorePatterns": [
"<rootDir>/examples/.*",
"<rootDir>/test/execution-tests/.*"
],
"globals": {
"ts-jest": {
"isolatedModules": true
}
}
}
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
"semver": "^6.0.0"
},
"devDependencies": {
"@types/fs-extra": "^9.0.1",
"@types/jest": "^26.0.4",
"@types/micromatch": "^3.1.0",
"@types/node": "*",
"@types/semver": "^6.0.0",
Expand All @@ -84,6 +86,8 @@
"html-webpack-plugin": "^3.2.0",
"husky": "^2.0.0",
"jasmine-core": "^3.0.0",
"jest": "^26.1.0",
"jest-circus": "^26.1.0",
"karma": "^4.0.0",
"karma-chrome-launcher": "^2.2.0",
"karma-jasmine": "^2.0.0",
Expand All @@ -92,10 +96,13 @@
"karma-webpack": "^4.0.0-rc.5",
"lint-staged": "^8.0.0",
"markdown-toc": "^1.2.0",
"memfs": "^3.2.0",
"mkdirp": "^0.5.1",
"mocha": "^6.0.0",
"prettier": "^2.0.5",
"rimraf": "^2.6.2",
"rxjs": "^6.6.0",
"ts-jest": "^26.1.3",
"typescript": "^3.6.2",
"webpack": "^4.5.0",
"webpack-cli": "^3.1.1"
Expand Down
1 change: 1 addition & 0 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true,
"strict": true,
"module": "commonjs",
Expand Down