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

test: migrate to vitest #69

Merged
merged 1 commit into from
Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Build test dependencies
run: yarn turbo run build --filter=tagscript --no-deps
- name: Run tests
run: yarn test:coverage
run: yarn test --coverage
- name: Store code coverage report
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3
with:
Expand Down
15 changes: 0 additions & 15 deletions jest.config.mjs

This file was deleted.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"lint": "eslint packages --ext mjs,js,ts --fix",
"update": "yarn upgrade-interactive",
"postinstall": "husky install .github/husky",
"test": "turbo run test",
"test:coverage": "yarn jest --coverage"
"test": "vitest run",
"test:watch": "vitest"
},
"devDependencies": {
"@commitlint/cli": "^17.0.2",
Expand All @@ -27,26 +27,26 @@
"@knodes/typedoc-plugin-monorepo-readmes": "^0.22.5",
"@sapphire/eslint-config": "^4.3.7",
"@sapphire/prettier-config": "^1.4.3",
"@types/jest": "^28.1.2",
"@types/node": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.28.0",
"@typescript-eslint/parser": "^5.28.0",
"c8": "^7.11.3",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.18.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^8.0.1",
"jest": "^28.1.1",
"lint-staged": "^13.0.2",
"prettier": "^2.7.1",
"pretty-quick": "^3.1.3",
"ts-jest": "^28.0.5",
"tsup": "^6.1.2",
"turbo": "^1.2.16",
"typedoc": "^0.22.17",
"typedoc-monorepo-link-types": "^0.0.2",
"typedoc-plugin-djs-links": "^1.0.4",
"typedoc-plugin-mdn-links": "^1.0.6",
"typescript": "^4.7.4"
"typescript": "^4.7.4",
"vitest": "^0.15.1"
},
"repository": {
"type": "git",
Expand Down
14 changes: 0 additions & 14 deletions packages/tagscript-plugin-discord/jest.config.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion packages/tagscript-plugin-discord/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"prepack": "rollup-type-bundler -e tagscript discord.js",
"bump": "cliff-jumper",
"check-update": "cliff-jumper --dry-run",
"test": "jest"
"test": "vitest run"
},
"keywords": [
"tagscript",
Expand Down
14 changes: 14 additions & 0 deletions packages/tagscript-plugin-discord/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
globals: true,
coverage: {
enabled: true,
reporter: ['text', 'lcov', 'clover']
}
},
esbuild: {
target: 'es2020'
}
});
14 changes: 0 additions & 14 deletions packages/tagscript/jest.config.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion packages/tagscript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"prepack": "rollup-type-bundler",
"bump": "cliff-jumper",
"check-update": "cliff-jumper --dry-run",
"test": "jest"
"test": "vitest run"
},
"keywords": [
"tagscript",
Expand Down
14 changes: 14 additions & 0 deletions packages/tagscript/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
globals: true,
coverage: {
enabled: true,
reporter: ['text', 'lcov', 'clover']
}
},
esbuild: {
target: 'es2020'
}
});
3 changes: 2 additions & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"moduleResolution": "node",
"lib": ["esnext"],
"declaration": true,
"outDir": "dist"
"outDir": "dist",
"types": ["vitest/globals"]
},
"includes": ["src/**/*.ts"]
}
14 changes: 14 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
globals: true,
coverage: {
enabled: true,
reporter: ['text', 'lcov', 'clover']
}
},
esbuild: {
target: 'es2020'
}
});
Loading