-
-
Notifications
You must be signed in to change notification settings - Fork 228
test: migrate to vitest #349
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
Changes from 3 commits
93014fb
fc0e3b1
dc66997
576928e
ddf3a10
c855230
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,3 +13,5 @@ | |
|
|
||
| /shims | ||
| /coverage | ||
|
|
||
| /node_modules | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tests fail with a module not found error without this patch. @arcanis Clipanion could probably use the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PR fixing this issue: arcanis/clipanion#155 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| diff --git a/lib/platform/package.json b/lib/platform/package.json | ||
| index 5ea9d43740d1bdb509612376c0e9ce91d20f8b20..08d4f7327dee5e605107a343d73b2254ed08ddb9 100644 | ||
| --- a/lib/platform/package.json | ||
| +++ b/lib/platform/package.json | ||
| @@ -1,4 +1,4 @@ | ||
| { | ||
| - "main": "./node", | ||
| + "main": "./node.js", | ||
| "browser": "./browser" | ||
| } |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,12 +18,7 @@ | |
| "license": "MIT", | ||
| "packageManager": "[email protected]+sha224.00f08619463229f8ba40c4ee90e8c2e4ced1f11c3115c26f3b98432e", | ||
| "devDependencies": { | ||
| "@babel/core": "^7.14.3", | ||
| "@babel/plugin-transform-modules-commonjs": "^7.14.0", | ||
| "@babel/preset-typescript": "^7.13.0", | ||
| "@jest/globals": "^29.0.0", | ||
| "@types/debug": "^4.1.5", | ||
| "@types/jest": "^29.0.0", | ||
| "@types/node": "^20.4.6", | ||
| "@types/proxy-from-env": "^1", | ||
| "@types/semver": "^7.1.0", | ||
|
|
@@ -32,13 +27,11 @@ | |
| "@yarnpkg/eslint-config": "^2.0.0", | ||
| "@yarnpkg/fslib": "^3.0.0-rc.48", | ||
| "@zkochan/cmd-shim": "^6.0.0", | ||
| "babel-plugin-dynamic-import-node": "^2.3.3", | ||
| "better-sqlite3": "^10.0.0", | ||
| "clipanion": "^3.0.1", | ||
| "clipanion": "patch:clipanion@npm%3A3.2.1#~/.yarn/patches/clipanion-npm-3.2.1-fc9187f56c.patch", | ||
| "debug": "^4.1.1", | ||
| "esbuild": "^0.21.0", | ||
| "eslint": "^8.57.0", | ||
| "jest": "^29.0.0", | ||
| "proxy-from-env": "^1.1.0", | ||
| "semver": "^7.5.2", | ||
| "supports-color": "^9.0.0", | ||
|
|
@@ -47,6 +40,7 @@ | |
| "typescript": "^5.3.3", | ||
| "undici": "^6.19.2", | ||
| "v8-compile-cache": "^2.3.0", | ||
| "vitest": "^1.3.1", | ||
merceyz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "which": "^4.0.0" | ||
| }, | ||
| "resolutions": { | ||
|
|
@@ -62,7 +56,7 @@ | |
| "postpack": "run clean", | ||
| "rimraf": "node -e 'for(let i=2;i<process.argv.length;i++)fs.rmSync(process.argv[i],{recursive:true,force:true});'", | ||
| "typecheck": "tsc --noEmit", | ||
| "test": "jest" | ||
| "test": "vitest" | ||
| }, | ||
| "files": [ | ||
| "dist", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import {defineConfig} from 'vitest/config'; | ||
|
|
||
| // eslint-disable-next-line arca/no-default-export | ||
| export default defineConfig({ | ||
| test: { | ||
| setupFiles: [`./tests/setupTests.ts`], | ||
| testTimeout: 120000, | ||
| retry: 2, | ||
| }, | ||
| esbuild: { | ||
| target: `node${process.versions.node}`, | ||
| }, | ||
| }); |
Uh oh!
There was an error while loading. Please reload this page.