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

@ember/test-waiters getting required in production app? #184

Open
jacobq opened this issue Dec 16, 2020 · 2 comments
Open

@ember/test-waiters getting required in production app? #184

jacobq opened this issue Dec 16, 2020 · 2 comments

Comments

@jacobq
Copy link
Member

jacobq commented Dec 16, 2020

I think the reason that this slipped through CI is that during testing we have the devDependencies installed so the module gets resolved. However, when I tried to use this (v0.6.0) in a production app I run into an error like this:

ember-cli-plotly tried to import "@ember/test-waiters" but the package was not resolvable from C:\Users\user\path_to\projects\node_modules\ember-cli-plotly

@Gamma169 or @lsmun, did you encounter this problem?

@jacobq
Copy link
Member Author

jacobq commented Dec 16, 2020

I am pretty sure this is coming from 68b1954#diff-a3c0481f819ddcb17ceef5ebe509b39173047a05fd644b05c8f82d4180527961R5
but I'm not sure if I should fix by moving @ember/test-waiters from devDeps to deps or some other way (can't conditionally import AFAIK)

@Gamma169
Copy link

@jacobq, Hi we haven't pushed the new version into our production app yet. We needed the update for a new project and was planning on updating our production app in the new year. So we haven't come across this yet.

Since this module is integral to our production application, I will set aside time in the new year to help resolve issues that have come up and the things you mentioned in the last issue.
#176 (comment)

In the meantime, hope you have a nice holiday season! :)

jacobq added a commit that referenced this issue Dec 18, 2020
Note: For ember-qunit 5.x we had to add qunit and @ember/test-helpers as devDependencies
See https://github.com/emberjs/ember-qunit/blob/master/docs/migration.md#upgrading-from-v4x-to-v500

fix(deps): move @ember/test-waiters to dependencies (ref #184)
test: add DOM fixtures & move waiter to module scope

The truth comes out: I (Jacob) did not actually read all of the
ember-qunit 5.x migration guide that I mentioned in a previous commit.
Oops :)

This commit adds the DOM fixtures as explained here:
https://github.com/emberjs/ember-qunit/blob/master/docs/migration.md#dom-fixtures

It also addresses the warning triggered by accidentally recreating test
waiters since `buildWaiter` was being called from within the class
instead of at the module level as recommended by:
https://github.com/emberjs/ember-test-waiters#use-buildwaiter-in-module-scope
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

No branches or pull requests

2 participants