-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10412 from owncloud/vitest
test: switch from jest to vitest
- Loading branch information
Showing
300 changed files
with
3,053 additions
and
5,041 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
{ | ||
"extends": [ | ||
"@ownclouders", | ||
"plugin:jest/recommended" | ||
], | ||
"plugins": ["jest"], | ||
"rules": { | ||
"jest/no-standalone-expect": "off" | ||
} | ||
"@ownclouders" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
"lint": "eslint vite.config.ts '{packages,tests}/**/*.{js,ts,vue}' --color", | ||
"serve": "SERVER=true pnpm build:w", | ||
"test:e2e:cucumber": "NODE_TLS_REJECT_UNAUTHORIZED=0 TS_NODE_PROJECT=./tests/e2e/cucumber/tsconfig.json cucumber-js --profile=e2e -f json:tests/e2e/cucumber/report/cucumber_report.json", | ||
"test:unit": "NODE_OPTIONS=--unhandled-rejections=throw jest --config ./tests/unit/config/jest.config.ts", | ||
"test:unit": "NODE_OPTIONS=--unhandled-rejections=throw TZ=UTC vitest --config ./tests/unit/config/vitest.config.ts", | ||
"licenses:check": "license-checker-rseidelsohn --summary --relativeLicensePath --onlyAllow 'Python-2.0;Apache*;Apache License, Version 2.0;Apache-2.0;Apache 2.0;Artistic-2.0;BSD;BSD-3-Clause;CC-BY-3.0;CC-BY-4.0;CC0-1.0;ISC;MIT;MPL-2.0;Public Domain;Unicode-TOU;Unlicense;WTFPL' --excludePackages '@ownclouders/babel-preset;@ownclouders/eslint-config;@ownclouders/prettier-config;@ownclouders/tsconfig;@ownclouders/web-client;@ownclouders/web-pkg;draw-io;external;web-app-files;text-editor;preview;web-app-ocm;@ownclouders/design-system;pdf-viewer;web-app-search;admin-settings;webfinger;web-runtime'", | ||
"licenses:csv": "license-checker-rseidelsohn --relativeLicensePath --csv --out ./third-party-licenses/third-party-licenses.csv", | ||
"licenses:save": "license-checker-rseidelsohn --relativeLicensePath --out /dev/null --files ./third-party-licenses/third-party-licenses", | ||
|
@@ -63,16 +63,12 @@ | |
"@ownclouders/tsconfig": "workspace:*", | ||
"@playwright/test": "1.39.0", | ||
"@rollup/plugin-inject": "5.0.3", | ||
"@types/jest": "29.5.1", | ||
"@types/jest-axe": "3.5.9", | ||
"@types/lodash-es": "4.17.7", | ||
"@types/node": "16.18.30", | ||
"@types/node-fetch": "2.6.10", | ||
"@vitejs/plugin-vue": "4.6.2", | ||
"@vitejs/plugin-vue": "5.0.3", | ||
"@vue/test-utils": "v2.4.0-alpha.0", | ||
"@vue/vue3-jest": "29.2.4", | ||
"autoprefixer": "10.4.16", | ||
"babel-jest": "29.5.0", | ||
"browserslist-to-esbuild": "^1.2.0", | ||
"browserslist-useragent-regexp": "^4.0.0", | ||
"commander": "11.1.0", | ||
|
@@ -81,15 +77,8 @@ | |
"cucumber-html-reporter": "7.1.1", | ||
"ejs": "3.1.9", | ||
"eslint": "8.56.0", | ||
"eslint-plugin-jest": "^27.6.1", | ||
"flush-promises": "1.0.2", | ||
"git-repo-info": "2.1.1", | ||
"jest": "29.7.0", | ||
"jest-axe": "8.0.0", | ||
"jest-environment-jsdom": "29.7.0", | ||
"jest-mock-axios": "4.7.3", | ||
"jest-mock-extended": "3.0.5", | ||
"jest-serializer-vue-tjw": "^3.19.0", | ||
"join-path": "1.1.1", | ||
"jsdom": "^20.0.2", | ||
"license-checker-rseidelsohn": "3.3.0", | ||
|
@@ -104,12 +93,14 @@ | |
"rollup-plugin-node-polyfills": "0.2.1", | ||
"rollup-plugin-visualizer": "5.9.0", | ||
"sass": "1.69.7", | ||
"ts-jest": "29.1.1", | ||
"ts-node": "10.9.2", | ||
"tslib": "2.5.0", | ||
"typescript": "5.3.3", | ||
"url-search-params-polyfill": "8.1.1", | ||
"vite": "5.0.12", | ||
"vitest": "1.2.1", | ||
"vitest-mock-extended": "1.3.1", | ||
"@vitest/coverage-v8": "1.2.1", | ||
"vite-plugin-environment": "^1.1.3", | ||
"vue-tsc": "1.8.10", | ||
"vue3-gettext": "2.4.0", | ||
|
@@ -139,19 +130,6 @@ | |
"@uppy/utils": "https://github.com/owncloud/uppy/releases/download/v3.12.13-owncloud/uppy-utils.tgz", | ||
"@uppy/webdav": "https://github.com/owncloud/uppy/releases/download/v3.12.13-owncloud/uppy-webdav.tgz", | ||
"@uppy/xhr-upload": "https://github.com/owncloud/uppy/releases/download/v3.12.13-owncloud/uppy-xhr-upload.tgz" | ||
}, | ||
"packageExtensions": { | ||
"jest-serializer-vue-tjw": { | ||
"dependencies": { | ||
"@vue/compiler-sfc": "2.7.14" | ||
} | ||
} | ||
}, | ||
"patchedDependencies": { | ||
"[email protected]": "patches/[email protected]" | ||
} | ||
}, | ||
"jestSerializer": { | ||
"sortAttributes": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/design-system/src/components/OcAvatarCount/__snapshots__/OcAvatarCount.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`OcAvatarCount dynamically calculates font size 1`] = `<span class="oc-avatar-count" style="width: 100px; height: 100px; font-size: 40px;">+2</span>`; | ||
exports[`OcAvatarCount > dynamically calculates font size 1`] = `"<span class="oc-avatar-count" style="width: 100px; height: 100px; font-size: 40px;">+2</span>"`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 4 additions & 19 deletions
23
packages/design-system/src/components/OcAvatars/__snapshots__/OcAvatars.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`OcAvatars displays tooltip 1`] = ` | ||
<span> | ||
<span aria-hidden="true" class="oc-avatars"><oc-avatar-stub accessiblelabel="" src="https://images.unsplash.com/photo-1610216705422-caa3fcb6d158?ixid=MXwxMjA3fDB8MHxzZWFyY2h8MTB8fGZhY2V8ZW58MHwyfDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=60" username="Bob" width="30"></oc-avatar-stub><oc-avatar-stub accessiblelabel="" src="https://images.unsplash.com/photo-1584308972272-9e4e7685e80f?ixid=MXwxMjA3fDB8MHxzZWFyY2h8Mzh8fGZhY2V8ZW58MHwyfDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=60" username="Marie" width="30"></oc-avatar-stub> <!--v-if--> <oc-avatar-count-stub count="3" size="30"></oc-avatar-count-stub></span> | ||
<span class="oc-invisible-sr">List of users</span> | ||
</span> | ||
`; | ||
exports[`OcAvatars > displays tooltip 1`] = `"<span><span class="oc-avatars" aria-hidden="true"><oc-avatar-stub src="https://images.unsplash.com/photo-1610216705422-caa3fcb6d158?ixid=MXwxMjA3fDB8MHxzZWFyY2h8MTB8fGZhY2V8ZW58MHwyfDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=60" username="Bob" accessiblelabel="" width="30"></oc-avatar-stub><oc-avatar-stub src="https://images.unsplash.com/photo-1584308972272-9e4e7685e80f?ixid=MXwxMjA3fDB8MHxzZWFyY2h8Mzh8fGZhY2V8ZW58MHwyfDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=60" username="Marie" accessiblelabel="" width="30"></oc-avatar-stub> <!--v-if--> <oc-avatar-count-stub count="3" size="30"></oc-avatar-count-stub></span> <span class="oc-invisible-sr">List of users</span></span>"`; | ||
|
||
exports[`OcAvatars prefers avatars over links when maxDisplayed is exceeded 1`] = ` | ||
<span> | ||
<span aria-hidden="true" class="oc-avatars"><oc-avatar-stub accessiblelabel="" src="https://images.unsplash.com/photo-1610216705422-caa3fcb6d158?ixid=MXwxMjA3fDB8MHxzZWFyY2h8MTB8fGZhY2V8ZW58MHwyfDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=60" username="Bob" width="30"></oc-avatar-stub><oc-avatar-stub accessiblelabel="" src="https://images.unsplash.com/photo-1584308972272-9e4e7685e80f?ixid=MXwxMjA3fDB8MHxzZWFyY2h8Mzh8fGZhY2V8ZW58MHwyfDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=60" username="Marie" width="30"></oc-avatar-stub><oc-avatar-stub accessiblelabel="" src="" username="John Richards Emperor of long names" width="30"></oc-avatar-stub> <!--v-if--> <oc-avatar-count-stub count="2" size="30"></oc-avatar-count-stub></span> | ||
<span class="oc-invisible-sr">List of users</span> | ||
</span> | ||
`; | ||
exports[`OcAvatars > prefers avatars over links when maxDisplayed is exceeded 1`] = `"<span><span class="oc-avatars" aria-hidden="true"><oc-avatar-stub src="https://images.unsplash.com/photo-1610216705422-caa3fcb6d158?ixid=MXwxMjA3fDB8MHxzZWFyY2h8MTB8fGZhY2V8ZW58MHwyfDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=60" username="Bob" accessiblelabel="" width="30"></oc-avatar-stub><oc-avatar-stub src="https://images.unsplash.com/photo-1584308972272-9e4e7685e80f?ixid=MXwxMjA3fDB8MHxzZWFyY2h8Mzh8fGZhY2V8ZW58MHwyfDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=60" username="Marie" accessiblelabel="" width="30"></oc-avatar-stub><oc-avatar-stub src="" username="John Richards Emperor of long names" accessiblelabel="" width="30"></oc-avatar-stub> <!--v-if--> <oc-avatar-count-stub count="2" size="30"></oc-avatar-count-stub></span> <span class="oc-invisible-sr">List of users</span></span>"`; | ||
|
||
exports[`OcAvatars shows avatars first and links last 1`] = ` | ||
<span> | ||
<span aria-hidden="true" class="oc-avatars"><oc-avatar-stub accessiblelabel="" src="https://images.unsplash.com/photo-1610216705422-caa3fcb6d158?ixid=MXwxMjA3fDB8MHxzZWFyY2h8MTB8fGZhY2V8ZW58MHwyfDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=60" username="Bob" width="30"></oc-avatar-stub><oc-avatar-stub accessiblelabel="" src="https://images.unsplash.com/photo-1584308972272-9e4e7685e80f?ixid=MXwxMjA3fDB8MHxzZWFyY2h8Mzh8fGZhY2V8ZW58MHwyfDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=60" username="Marie" width="30"></oc-avatar-stub><oc-avatar-stub accessiblelabel="" src="" username="John Richards Emperor of long names" width="30"></oc-avatar-stub> <oc-avatar-link-stub accessiblelabel="" iconsize="small" name="link 0" width="30"></oc-avatar-link-stub><oc-avatar-link-stub accessiblelabel="" iconsize="small" name="link 1" width="30"></oc-avatar-link-stub> <!--v-if--></span> | ||
<span class="oc-invisible-sr">List of users</span> | ||
</span> | ||
`; | ||
exports[`OcAvatars > shows avatars first and links last 1`] = `"<span><span class="oc-avatars" aria-hidden="true"><oc-avatar-stub src="https://images.unsplash.com/photo-1610216705422-caa3fcb6d158?ixid=MXwxMjA3fDB8MHxzZWFyY2h8MTB8fGZhY2V8ZW58MHwyfDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=60" username="Bob" accessiblelabel="" width="30"></oc-avatar-stub><oc-avatar-stub src="https://images.unsplash.com/photo-1584308972272-9e4e7685e80f?ixid=MXwxMjA3fDB8MHxzZWFyY2h8Mzh8fGZhY2V8ZW58MHwyfDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=60" username="Marie" accessiblelabel="" width="30"></oc-avatar-stub><oc-avatar-stub src="" username="John Richards Emperor of long names" accessiblelabel="" width="30"></oc-avatar-stub> <oc-avatar-link-stub name="link 0" accessiblelabel="" width="30" iconsize="small"></oc-avatar-link-stub><oc-avatar-link-stub name="link 1" accessiblelabel="" width="30" iconsize="small"></oc-avatar-link-stub> <!--v-if--></span> <span class="oc-invisible-sr">List of users</span></span>"`; |
Oops, something went wrong.