-
Notifications
You must be signed in to change notification settings - Fork 100
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: Add a test covering wxt init
in a non-empty directory
#563
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
e2e/tests/init.test.ts
Outdated
await execaCommand(`pnpm -s wxt init ${project.root} -t vue --pm npm`, { | ||
env: { ...process.env, CI: 'true' }, | ||
stdio: 'ignore', | ||
}); |
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.
await execaCommand(`pnpm -s wxt init ${project.root} -t vue --pm npm`, { | |
env: { ...process.env, CI: 'true' }, | |
stdio: 'ignore', | |
}); | |
await fs.writeJson(project.resolve('package.json'), {}); |
Init E2E tests are slow, so rather than bootstrapping twice, creating a single file in the directory would speed them up.
Specifically, I've had problems with init tests timing out in GitHub actions when ran on windows. The install step is super slow.
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.
Makes sense.
However, the project.resolve
method does not exist, I replaced it with project.resolvePath
. And there is still a problem after the replacement, fs.writeJSON
will throw an error, No such 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.
Oh yeah, it's resolvePath
. The no such file error was because the project directory didn't exist yet.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #563 +/- ##
==========================================
+ Coverage 86.40% 86.49% +0.09%
==========================================
Files 111 111
Lines 8877 8874 -3
Branches 878 879 +1
==========================================
+ Hits 7670 7676 +6
+ Misses 1193 1184 -9
Partials 14 14 ☔ View full report in Codecov by Sentry. |
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 updated the test
wxt init
in a non-empty directory
Released in v0.17.8 |
Thanks! |
Supplement #556