Skip to content

Commit

Permalink
test: migrate to vitest (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
imranbarbhuiya committed Jun 20, 2022
1 parent 94578b6 commit ed23618
Show file tree
Hide file tree
Showing 12 changed files with 606 additions and 1,923 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
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
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
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
@@ -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
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
@@ -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
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
@@ -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'
}
});

0 comments on commit ed23618

Please sign in to comment.