Skip to content

Commit

Permalink
Migrate type tests to TSTyche (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrazauskas committed Feb 23, 2024
1 parent c34a239 commit 8c111e6
Show file tree
Hide file tree
Showing 31 changed files with 1,272 additions and 966 deletions.
4 changes: 0 additions & 4 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ updates:
typescript-eslint:
patterns:
- '@typescript-eslint/*'
typescript:
patterns:
- 'typescript'
- '@tsd/typescript'

- package-ecosystem: 'github-actions'
directory: '/'
Expand Down
11 changes: 9 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@ Please follow these guidelines:
Make sure that Node.js (at least version 14) is installed.
Install all development dependencies with `npm install`.

Run tests or type tests in watch mode:
Run tests:

```bash
npm run test
# or in watch mode
npm run test:watch
npm run type-test:watch
```

And type tests:

```bash
npm run type-test
```

Before you commit, run all following commands to ensure that all tests pass:
Expand Down
12 changes: 0 additions & 12 deletions jest.config.tsd.ts

This file was deleted.

134 changes: 31 additions & 103 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"scripts": {
"test": "jest",
"test:watch": "jest --watch",
"type-test": "jest -c jest.config.tsd.ts",
"type-test:watch": "jest -c jest.config.tsd.ts --watch",
"type-test": "tstyche",
"format": "prettier . --write",
"lint": "npm run lint:eslint && npm run lint:markdownlint && npm run lint:prettier",
"lint:eslint": "eslint .",
Expand Down Expand Up @@ -44,7 +43,6 @@
},
"homepage": "https://github.com/FloEdelmann/vue-ts-types",
"devDependencies": {
"@tsd/typescript": "^5.3.3",
"@types/jest": "^29.5.12",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
Expand All @@ -55,11 +53,11 @@
"eslint-plugin-unicorn": "^51.0.1",
"jest": "^29.7.0",
"jest-extended": "^4.0.2",
"jest-runner-tsd": "^6.0.0",
"markdownlint-cli": "^0.39.0",
"prettier": "3.2.5",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"tstyche": "^1.0.0",
"typescript": "^5.3.3",
"vue": "^3.4.19",
"vue2-6": "npm:vue@~2.6.14",
Expand Down
9 changes: 1 addition & 8 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,5 @@
"compilerOptions": {
"rootDir": "./src"
},
"exclude": [
"jest.config.ts",
"jest.config.tsd.ts",
"tests",
"type-tests",
"node_modules",
"dist"
]
"exclude": ["jest.config.ts", "tests", "type-tests", "node_modules", "dist"]
}
4 changes: 4 additions & 0 deletions tstyche.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://tstyche.org/schemas/config.json",
"testFileMatch": ["**/type-tests/**/*.type.spec.ts"]
}
Loading

0 comments on commit 8c111e6

Please sign in to comment.