-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
[chore]: use TSTyche for type testing #2901
base: master
Are you sure you want to change the base?
Conversation
"node_modules/@tsd/typescript": { | ||
"version": "4.8.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means [email protected]
is currently used to test types. But the installed version of TypeScript is 5.4.5.
Hm.. Is this intentional? TSTyche can test agains specific version, e.g. tstyche --target 4.8
. This command would use the latest version in 4.8
series (4.8.4
). Or simply: tstyche --target 4.8.4
.
@@ -94,6 +95,6 @@ | |||
"test-redis-socket": "mocha packages/controller/test/redis-socket/*.ts --exit", | |||
"test-redis-sentinel": "mocha packages/controller/test/redis-sentinel/*.ts --exit", | |||
"test-types-check": "tsc --project packages/controller/tsconfig.check.json", | |||
"test-types": "npm run test-types-check && npm run test --workspace=@iobroker/types" | |||
"test-types": "npm run test-types-check && tstyche packages/types-public/typetest/*.tst.ts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the above: "test": "mocha packages/controller/test/*.ts --exit"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to packages/types-public/typetest
directory, that is named similar to packages/controller/test
.
Also renaming this file, because **/*.tst.*
is the default test file pattern of TSTyche. It is possible to select **/*.test-d.ts
files as well, but that would require adding tstyche.config.json
.
Closes #2900
Implementation details
TSTyche is installed and used for type testing.
package-lock.json
you can see many dependencies removed (including the conflicting ones mentioned in Conflicts with@types/eslint
due toeslint-formatter-pretty
dependency tsdjs/tsd#221)npm run test --workspace=@iobroker/types -- --target 4.8,current
Tests
Documentation
N/A