Skip to content

Commit

Permalink
test: adjust test structure (#5607)
Browse files Browse the repository at this point in the history
* chore: use swc/jest replace ts-jest

* test: adjust test env and cases

* chore: remove prettier to format snapshot

* test: update snapshots

* chore: adsjut test case

* refactor: optmize canvas destroy

* test: use xml-formatter to format snapshots

* test: add toMatchAnimation matcher

* test: add createGraph util

* test: adjust test demo and types

* test: update test case and snapshots

* chore: rename cases folder to unit
  • Loading branch information
Aarebecca authored Apr 2, 2024
1 parent 6135475 commit 6425dbc
Show file tree
Hide file tree
Showing 556 changed files with 47,526 additions and 191,975 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
"@swc/core": "^1.4.11",
"@swc/jest": "^0.2.36",
"@types/jest": "^29.5.12",
"@types/jsdom": "^21.1.6",
"@types/node": "^20.11.24",
Expand All @@ -56,9 +58,9 @@
"rollup-plugin-polyfill-node": "^0.13.0",
"rollup-plugin-visualizer": "^5.12.0",
"stats.js": "^0.17.0",
"ts-jest": "^29.1.2",
"turbo": "^1.12.4",
"typescript": "^5.3.3",
"vite": "^5.1.5"
"vite": "^5.1.5",
"xml-formatter": "^3.6.2"
}
}
15 changes: 1 addition & 14 deletions packages/g6-extension-3d/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
module.exports = {
preset: 'ts-jest/presets/js-with-ts',
transform: {
'^.+\\.[tj]s$': [
'ts-jest',
{
diagnostics: {
exclude: ['**'],
},
tsconfig: {
allowJs: true,
target: 'esnext',
esModuleInterop: true,
},
},
],
'^.+\\.[tj]s$': ['@swc/jest'],
},
testRegex: '(/__tests__/.*\\.(test|spec))\\.(ts|tsx|js)$',
collectCoverageFrom: ['src/**/*.ts'],
Expand Down
70 changes: 0 additions & 70 deletions packages/g6/__tests__/demo/animation/animation-breathe.ts

This file was deleted.

64 changes: 0 additions & 64 deletions packages/g6/__tests__/demo/animation/animation-fade-in.ts

This file was deleted.

64 changes: 0 additions & 64 deletions packages/g6/__tests__/demo/animation/animation-translate.ts

This file was deleted.

83 changes: 0 additions & 83 deletions packages/g6/__tests__/demo/animation/animation-wave.ts

This file was deleted.

67 changes: 0 additions & 67 deletions packages/g6/__tests__/demo/animation/animation-zoom-in.ts

This file was deleted.

Loading

0 comments on commit 6425dbc

Please sign in to comment.