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

Fix Tests #648

Merged
merged 2 commits into from
Sep 15, 2018
Merged

Fix Tests #648

merged 2 commits into from
Sep 15, 2018

Conversation

lukeed
Copy link
Member

@lukeed lukeed commented Sep 15, 2018

What kind of change does this PR introduce?

Fix

Did you add tests for your changes?

meta

Summary

The tests are scaffolding the default template which relies on preact-cli@2.x, which requires that there be a .babelrc file to handle NODE_ENV-dependent modules formatting.

The .babelrc file itself was also broken. See preactjs-templates/default#21.
^ Not required for this PR.

The current preact-cli/babel (and #639) will respond to a test environment automatically, so there'll be no need to ship a .babelrc file.

The Cannot find module "preact-cli/babel" was thrown in testing because we use --cwd while building the test directories (for performance / to avoid npm install xN). When this happens, dependency lookups are done from the root directory.

Well, the root directory doesn't have preact-cli as devDependency ... only the test directory does. Because of that, the process can't find a module named "preact-cli"; let alone a entry file within it.

Does this PR introduce a breaking change?

No

@lukeed lukeed merged commit 4f25dd5 into next Sep 15, 2018
@lukeed lukeed deleted the fix/tests branch September 15, 2018 22:46
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.

2 participants