-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Allow specifying the test files and typings file manually #74
Conversation
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.
LGTM, can you add some unit tests?
Hey, I've added some unit tests. @Ethan-Arrowood. Thanks :) |
I like the idea. However, I believe we should go for globbing patterns for the Other than that, good idea to add this! |
Hey @SamVerschueren, |
@SamVerschueren @Ethan-Arrowood ping 🙂 |
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 looks good. Tests are great too! Good work 😁
Yay, thanks. Also, there's another PR #75 you might want to checkout after this one |
Hoping to see this merged. In a project with a build step, |
…ts into type_tests to avoid needing to place in dist.
readme.md
Outdated
type: `string[]`<br> | ||
default: `['']` | ||
|
||
An array of test files with their path |
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.
Same as above (needs to answer what its purpose is) and you're missing a dot at the end.
Is this good to go now? 🙂 We're currently using a fork, would be lovely to use the mainline 👍 |
Co-authored-by: Sam Verschueren <[email protected]>
I've made the changes. Let me know if it's all good @SamVerschueren :) |
Awesome! Thanks for working on this 🙏 ! |
This PR aims to add two more options:
testFiles
andtypingsFile
apart fromcwd
. These are optional and allows developers to manually specify the files which may be somewhere else in the project instead of forcing them to follow a pattern that TSD expects.This allows us to use TSD in Jest and many other test frameworks so developers can check type definitions without leaving ecosystem.
By merging this, TSD can be used in many ways
Method 1:
Let TSD figure out everything by itself. Uses
process.cwd()
. Works the way it used to work.Method 2:
Pass
cwd
and also the relative path totypingsFile
only.Method 3:
Pass
cwd
and also the relative path totestFiles
.Method 4:
Pass
cwd
and pass relative paths to bothtypingsFile
andtestFiles
.