-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat: allow require mocha from outside #204
Conversation
```js const Mocha = require('egg-bin').requireMocha(); ```
if (typeof fsPromises.cp === 'function') { | ||
return await fsPromises.cp(src, target, { force: true, recursive: true }); | ||
} | ||
return execSync(`cp -R ${src} ${target}`); |
Check warning
Code scanning / CodeQL
Shell command built from environment values
其实我当时倾向于 egg-bin 不要内置 mocha 这些,而仅仅作为 mocha opts 文件的生成器,这样的话 vscode 等的 mocha 插件就能用上了。https://github.com/artus-cli/artus-cli/blob/master/.mocharc.cjs |
Codecov ReportBase: 100.00% // Head: 100.00% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #204 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 12 12
Lines 93 93
Branches 16 16
=========================================
Hits 93 93 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
不内置对应用开发者又得感知 mocha 的升级,不好的。 |
可以内置依赖,但运行的时候,不是 egg-bin -> fork mocha,而可以是 mocharc 文件驱动的 mocha -> |
来个 pr 重构起来。 |
[skip ci] ## [5.12.0](v5.11.3...v5.12.0) (2023-01-09) ### Features * allow require mocha from outside ([#204](#204)) ([6f59f6e](6f59f6e))
🎉 This PR is included in version 5.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Checklist
npm test
passesAffected core subsystem(s)
Description of change