From 1fb8ee2e1e154537ec82274fc82088f1cb896773 Mon Sep 17 00:00:00 2001 From: Ermal Kaleci Date: Mon, 20 Feb 2023 15:16:47 +0100 Subject: [PATCH] update vitest --- .eslintignore | 1 + e2e/.eslintignore | 1 - e2e/package.json | 14 +++----------- package.json | 4 +++- packages/chopsticks/.eslintignore | 1 - packages/chopsticks/package.json | 6 +++--- packages/chopsticks/vitest.config.ts | 8 -------- packages/core/.eslintignore | 1 - packages/core/package.json | 6 +++--- packages/core/vitest.config.ts | 8 -------- e2e/vitest.config.ts => vitest.config.ts | 0 yarn.lock | 9 +++++---- 12 files changed, 18 insertions(+), 41 deletions(-) create mode 100644 .eslintignore delete mode 100644 packages/chopsticks/vitest.config.ts delete mode 100644 packages/core/vitest.config.ts rename e2e/vitest.config.ts => vitest.config.ts (100%) diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..060e9ebe --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +vitest.config.ts diff --git a/e2e/.eslintignore b/e2e/.eslintignore index 5dffb2ed..c2658d7d 100644 --- a/e2e/.eslintignore +++ b/e2e/.eslintignore @@ -1,2 +1 @@ -vitest.config.ts node_modules/ diff --git a/e2e/package.json b/e2e/package.json index aadc2570..5dbc45f0 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -5,7 +5,8 @@ "scripts": { "lint": "tsc --noEmit --project tsconfig.json && eslint . --ext .js,.ts && prettier --check .", "fix": "eslint . --ext .js,.ts --fix && prettier -w .", - "test": "vitest --silent", + "test": "vitest run", + "test:watch": "vitest", "sidecar": "sh ./scripts/sidecar-chopsticks.sh" }, "engines": { @@ -24,15 +25,6 @@ "eslint-plugin-import": "^2.27.5", "eslint-plugin-sort-imports-es6-autofix": "^0.6.0", "prettier": "^2.8.4", - "vitest": "^0.28.3" - }, - "prettier": { - "tabWidth": 2, - "semi": false, - "singleQuote": true - }, - "lint-staged": { - "*.{js,ts}": "eslint --cache --fix", - "*.{js,ts,css,md}": "prettier --write" + "vitest": "^0.28.5" } } diff --git a/package.json b/package.json index e341994c..fe3e3ae6 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "build-wasm": "wasm-pack build executor --target nodejs --scope acala-network", "build-wasm-logging": "yarn build-wasm --features=logging", "check": "cd executor && cargo check --locked", - "test": "yarn workspaces foreach run test", + "test": "vitest run", + "test:watch": "vitest", "start": "yarn workspace @acala-network/chopsticks run start", "dev": "yarn workspace @acala-network/chopsticks run dev", "dev:karura": "yarn workspace @acala-network/chopsticks run dev:karura", @@ -37,6 +38,7 @@ }, "devDependencies": { "husky": "^8.0.3", + "vitest": "^0.28.5", "wasm-pack": "^0.10.3" } } diff --git a/packages/chopsticks/.eslintignore b/packages/chopsticks/.eslintignore index 5733ce02..0df4b9bc 100644 --- a/packages/chopsticks/.eslintignore +++ b/packages/chopsticks/.eslintignore @@ -1,4 +1,3 @@ -vitest.config.ts node_modules/ lib/ preview/ diff --git a/packages/chopsticks/package.json b/packages/chopsticks/package.json index 18ced27d..3130673f 100644 --- a/packages/chopsticks/package.json +++ b/packages/chopsticks/package.json @@ -10,8 +10,8 @@ "lint": "tsc --noEmit --project tsconfig.json && eslint . --ext .js,.ts && prettier --check .", "fix": "eslint . --ext .js,.ts --fix && prettier -w .", "build": "rm -rf lib && tsc -p ./tsconfig.json", - "test": "vitest --silent", - "test:dev": "LOG_LEVEL=trace vitest --inspect", + "test": "vitest run", + "test:watch": "vitest", "start": "ts-node --transpile-only src/cli.ts", "dev": "LOG_LEVEL=trace ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=../../configs/dev.yml", "dev:karura": "ts-node-dev --transpile-only --inspect --notify=false src/cli.ts -- dev --config=../../configs/karura.yml", @@ -58,7 +58,7 @@ "ts-node": "^10.9.1", "ts-node-dev": "^2.0.0", "typescript": "^4.9.4", - "vitest": "^0.28.3" + "vitest": "^0.28.5" }, "files": [ "lib", diff --git a/packages/chopsticks/vitest.config.ts b/packages/chopsticks/vitest.config.ts deleted file mode 100644 index cde75c09..00000000 --- a/packages/chopsticks/vitest.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { defineConfig } from 'vitest/config' - -export default defineConfig({ - test: { - hookTimeout: 30000, - testTimeout: 120000, - }, -}) diff --git a/packages/core/.eslintignore b/packages/core/.eslintignore index 015ef599..88edb628 100644 --- a/packages/core/.eslintignore +++ b/packages/core/.eslintignore @@ -1,3 +1,2 @@ -vitest.config.ts node_modules/ lib/ diff --git a/packages/core/package.json b/packages/core/package.json index 4043d715..33c47483 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -9,8 +9,8 @@ "lint": "tsc --noEmit --project tsconfig.json && eslint . --ext .js,.ts && prettier --check .", "fix": "eslint . --ext .js,.ts --fix && prettier -w .", "build": "rm -rf lib && tsc -p ./tsconfig.json", - "test": "vitest --silent", - "test:dev": "LOG_LEVEL=trace vitest --inspect" + "test": "vitest run", + "test:watch": "vitest" }, "devDependencies": { "@types/prettier": "^2", @@ -21,7 +21,7 @@ "eslint-plugin-import": "^2.27.5", "eslint-plugin-sort-imports-es6-autofix": "^0.6.0", "prettier": "^2.8.4", - "vitest": "^0.28.3" + "vitest": "^0.28.5" }, "files": [ "lib" diff --git a/packages/core/vitest.config.ts b/packages/core/vitest.config.ts deleted file mode 100644 index cde75c09..00000000 --- a/packages/core/vitest.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { defineConfig } from 'vitest/config' - -export default defineConfig({ - test: { - hookTimeout: 30000, - testTimeout: 120000, - }, -}) diff --git a/e2e/vitest.config.ts b/vitest.config.ts similarity index 100% rename from e2e/vitest.config.ts rename to vitest.config.ts diff --git a/yarn.lock b/yarn.lock index bbf78e3e..db8c0df7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17,7 +17,7 @@ __metadata: eslint-plugin-import: ^2.27.5 eslint-plugin-sort-imports-es6-autofix: ^0.6.0 prettier: ^2.8.4 - vitest: ^0.28.3 + vitest: ^0.28.5 languageName: unknown linkType: soft @@ -35,7 +35,7 @@ __metadata: eslint-plugin-import: ^2.27.5 eslint-plugin-sort-imports-es6-autofix: ^0.6.0 prettier: ^2.8.4 - vitest: ^0.28.3 + vitest: ^0.28.5 languageName: unknown linkType: soft @@ -82,7 +82,7 @@ __metadata: ts-node-dev: ^2.0.0 typeorm: ^0.3.11 typescript: ^4.9.4 - vitest: ^0.28.3 + vitest: ^0.28.5 ws: ^8.12.0 yargs: ^17.6.2 zod: ^3.20.2 @@ -4612,6 +4612,7 @@ __metadata: resolution: "root-workspace-0b6124@workspace:." dependencies: husky: ^8.0.3 + vitest: ^0.28.5 wasm-pack: ^0.10.3 languageName: unknown linkType: soft @@ -5561,7 +5562,7 @@ __metadata: languageName: node linkType: hard -"vitest@npm:^0.28.3": +"vitest@npm:^0.28.5": version: 0.28.5 resolution: "vitest@npm:0.28.5" dependencies: