Skip to content
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

Add tests for pre-publish tasks #384

Closed
itaisteinherz opened this issue Apr 5, 2019 · 6 comments · Fixed by #509
Closed

Add tests for pre-publish tasks #384

itaisteinherz opened this issue Apr 5, 2019 · 6 comments · Fixed by #509
Labels
🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted

Comments

@itaisteinherz
Copy link
Collaborator

itaisteinherz commented Apr 5, 2019

Issuehunt badges

We need to add tests for the prerequisite and Git tasks (source/prerequisite-tasks.js and source/git-tasks.js).


IssueHunt Summary

bunysae bunysae has been rewarded.

Backers (Total: $60.00)

Submitted pull Requests


Tips

@IssueHuntBot
Copy link

@IssueHunt has funded $60.00 to this issue.


@itaisteinherz
Copy link
Collaborator Author

Also see #392 (comment).

@MarcoScabbiolo
Copy link
Contributor

Are we talking about unit tests of these files or integration with all the other files they depend on? What is the preferred way to mock modules, both for dependencies and for local ones, global variables or using jest instead of ava?

@itaisteinherz
Copy link
Collaborator Author

Are we talking about unit tests of these files or integration with all the other files they depend on?

Unit tests (for the moment being).

What is the preferred way to mock modules, both for dependencies and for local ones, global variables or using jest instead of ava?

See #29. We'll definitely use ava for testing, and I think either sinon or mockery would do the job here.
@sindresorhus in #29 (comment), how did you intend for the modules to be mocked?

@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label May 10, 2019
@bunysae
Copy link
Contributor

bunysae commented Feb 22, 2020

My idea to solve this problem would be to stub or to mock the commands called with execa. For this purpose, i started creating a little test-double library for execa based on sinon, which should simplify stubbing or mocking execa-commands.

@issuehunt-oss
Copy link

issuehunt-oss bot commented Jul 7, 2020

@sindresorhus has rewarded $54.00 to @bunysae. See it on IssueHunt

  • 💰 Total deposit: $60.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $6.00

@issuehunt-oss issuehunt-oss bot added 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt and removed 💵 Funded on Issuehunt This issue has been funded on Issuehunt labels Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants