-
-
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
Achieve 100% test coverage #370
Achieve 100% test coverage #370
Conversation
…index.ts if typescriptSupport is not enabled
Um... I'm going to investigate. |
Waiting for #371 to be merged. |
You are targetting master, but #371 is targetting next |
Can we achieve this on master instead? I think it would be a moving target on next. |
Should I try to fix the failing TS test here? |
The test that's failing here and the one in 371 are different I think So for this PR, I'd suggest making the tests pass and merging to |
const isSWCNodeRegister = process._preload_modules && process._preload_modules.includes('@swc-node/register') | ||
const isSWCRegister = process._preload_modules?.includes('@swc/register') | ||
const isSWCNodeRegister = process._preload_modules?.includes('@swc-node/register') | ||
/* istanbul ignore next - OS specific */ | ||
const isSWCNode = typeof process.env._ === 'string' && process.env._.includes('.bin/swc-node') |
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.
Never evaluated on windows...
Ready For Review |
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
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
Fixed #369
I failed to cover some branches, so I have removed them. If you can find a way to fully evaluate these branches, please let me know. However, it's possible that they may be obsolete.
I've created an
issues
folder for issues related tests, which will need to follow this pattern:test/issues/<issue-number>/test.js
. Since we're testing the autoloader, we need to create fixtures. This is why I chose to create a folder named after the issue instead of placing<issue-number>.js
directly.If you agree with this approach, I will update this PR to reflect these changes.