You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when prepend option is specified, this breaks ember t --environment=production
looks like it's failing due to the changing of asset URLs in tests/index.html, so they are not found (404)
I guess I know why it's failing - broccoli-asset-rev doesn't care that we're testing, and not creating a production build. Is there a possible workaround?
not ok 1 Chrome 59.0 - Global error: Uncaught ReferenceError: Ember is not defined at http://localhost:7357/4492/tests/index.html?hidepassed, line 39
---
Log: |
{ type: 'error',
text: 'Uncaught ReferenceError: Ember is not defined at http://localhost:7357/4492/tests/index.html?hidepassed, line 39\n' }
...
just tried this with a blank app (ember new) to confirm
specifying a command line argument that I can read in config/environment.js and ember-cli-build.js as follows:
when doing a production build, just build like normal: ember build --environment=production
when doing a production test, add a command line argument, which I called test like so: test=false ember build --environment=production (it is necessary to specify the argument before the ember command because ember will discard it otherwise)
then we can read this in the two necessary places to conditionally apply the change to rootURL:
It's not pretty but it works. Ideally, there would be an already existing environment flag that we could read - it seems reasonable to expect that we would be able to know whether we ran ember build or ember test without this sort of a workaround.
Using the prepend / fingerprinting described here: https://ember-cli.com/user-guide/#fingerprinting-and-cdn-urls
when prepend option is specified, this breaks
ember t --environment=production
looks like it's failing due to the changing of asset URLs in
tests/index.html
, so they are not found (404)I guess I know why it's failing -
broccoli-asset-rev
doesn't care that we're testing, and not creating a production build. Is there a possible workaround?just tried this with a blank app (
ember new
) to confirmrepro steps:
ember new foo
ember t --environment=production
Output from
ember version --verbose && npm --version
:The text was updated successfully, but these errors were encountered: