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 pre-publish task tests #509

Merged
merged 4 commits into from
Jul 7, 2020
Merged

Conversation

bunysae
Copy link
Contributor

@bunysae bunysae commented Mar 1, 2020

Fixes #384. Stubs were created for the commands as mention in my comment.
The tests run serially because the stubbed execa-dependency is cached when loaded the first time (see avajs/ava#1066 and https://nodejs.org/api/modules.html#modules_caching).


IssueHunt Summary

Referenced issues

This pull request has been submitted to:


IssueHunt has been backed by the following sponsors. Become a sponsor

stdout: '{"sindresorhus": "read"}'
}
]);
process.env.NODE_ENV = 'P';
Copy link
Contributor Author

@bunysae bunysae Mar 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting the NODE_ENV-environment-variable was necessary. Otherwise this task is always skipped
(see https://github.com/sindresorhus/np/blob/master/source/.prerequisite-tasks.js line 33).
When i put this environment-variable directly in ava-configuration, some other tests were broken.

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@sindresorhus sindresorhus merged commit fac6558 into sindresorhus:master Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests for pre-publish tasks
2 participants