refactor(types): migrate from tsd to tstyche#473
Conversation
|
No linked issues found. Please add the corresponding issues in the pull request description. |
|
lgtm |
| "lint": "eslint .", | ||
| "test": "c8 node --test && npm run test:types", | ||
| "test:types": "tsd", | ||
| "test": "c8 node --test test/index.test.js && npm run test:types", |
There was a problem hiding this comment.
I reviewed it. But it is required; otherwise, the test runner also runs the .tst.ts file.
There was a problem hiding this comment.
oh but is it a problem with the test runner or with our file naming then? I think we should try to leverage as much as possible what comes with Node's test runner, and adapt the rest of our code accordingly, assuming there's a cleaner way to do this.
There was a problem hiding this comment.
@simoneb I aligned the types with the other Fastify plugin.
fastify-jwt
fast-json-stringify-compiler
Now the types and their tests are inside the types folder.
By doing so, the test runner works again without options
cc886a6 to
8e83eda
Compare
0a41bcf to
6da51bb
Compare
- Replace tsd with tstyche for type testing - Update test:types script to use tstyche - Convert initialization.test-d.ts to initialization.tst.ts - Update index.d.ts to use ES module export syntax PR of Reference: - fastify/fastify#6532 - fastify/fastify#6525
Co-authored-by: Tom Mrazauskas <tom@mrazauskas.de>
Co-authored-by: Tom Mrazauskas <tom@mrazauskas.de>
6da51bb to
3bae89a
Compare
3bae89a to
9892727
Compare
PR of Reference: