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

Ensure test files load correct AVA installation #1085

Merged
merged 1 commit into from
Oct 22, 2016

Conversation

novemberborn
Copy link
Member

The main process sets the AVA_PATH environment variable to the absolute
path of the index.js file. Workers are loaded with this variable
present. When test files require the AVA module (assuming it's a version
containing this commit of course), the index.js file redirects to the
one used by the worker if necessary by comparing AVA_PATH.

The redirect required most of index.js to be moved into a separate
module (lib/main.js).

Fixes #643.

The main process sets the AVA_PATH environment variable to the absolute
path of the index.js file. Workers are loaded with this variable
present. When test files require the AVA module (assuming it's a version
containing this commit of course), the index.js file redirects to the
one used by the worker if necessary by comparing AVA_PATH.

The redirect required most of index.js to be moved into a separate
module (lib/main.js).

Fixes #643.
@vadimdemedes
Copy link
Contributor

LGTM!

@sindresorhus sindresorhus merged commit 3ea2ba1 into master Oct 22, 2016
@sindresorhus sindresorhus deleted the ensure-test-files-load-correct-ava branch October 22, 2016 05:08
@sindresorhus
Copy link
Member

🙌❤️

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.

3 participants