-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
test: add more fixtures for strip-types #54107
test: add more fixtures for strip-types #54107
Conversation
Can you adjust the commit message to be prefixed with "test", and start with an active verb? Basically change the beginning to "test: add". Preferably, "test: add more fixtures for strip-types" |
ececa33
to
75ecd7e
Compare
Commit message updated @redyetidev <3 Thankss! |
Hi @kevinuehara I see fixtures being added, but these fixtures are not being tested |
HI @marco-ippolito In fact, these fixtures are testing Typescript's own and unique functionalities (Utility Types). If it were not available there would be an error when compiling for Javascript so it can be considered a test and validation of the new ts support functionality |
I'm not sure I understand. Where can I see those .ts files being executed or tested? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #54107 +/- ##
==========================================
- Coverage 88.06% 87.77% -0.29%
==========================================
Files 651 651
Lines 183386 183386
Branches 35800 35478 -322
==========================================
- Hits 161504 160976 -528
- Misses 15159 15673 +514
- Partials 6723 6737 +14 |
Hi @marco-ippolito! I update this PR with the tests |
@redyetidev @marco-ippolito @ErickWendel can review this PR? 🙏 |
can you please remove unrelated formatting changes? |
test('expect error when executing a TypeScript file with generics', async () => { | ||
const result = await spawnPromisified(process.execPath, [ | ||
'--experimental-strip-types', | ||
fixtures.path('typescript/ts/test-generics.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.
if we are testing paramenter properties, why call it test-generics
?
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.
I call test-generics
because I created the Typescript generics fixture. Do you have any suggestions for a name for the file?
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.
test-parameter-properties
?
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.
good! Thanks! I will change the file name
strictEqual(result.code, 0); | ||
}); | ||
|
||
test('execute a TypeScript file with Extract Union Type', async () => { |
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.
can you move the union test into one?
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.
you say create a separate test file to test the union?
also can you amend your first 2 commits with the right author? |
I needed to format and break the line due to lint 🤔 |
if it was there it means the lint has passed in the original PR 😄 |
@marco-ippolito I'll open a new PR with the updates.... I'm having trouble updating the author on the first two commits. |
In this MR I'm adding more tests created in this PR, testing generics and Utility Types.
This PR makes part of typescript iniciative on Node.
cc: @tniessen @ErickWendel