Comments (25)
Oh wow, in 0.0.11
I wanted to add compatibility with FastBoot 2.0, not force an upgrade. Yikes!
Let me make a new release that sets the FastBoot version back to ^1.2.1
from ember-cli-fastboot-testing.
Woooohoooooo!!!!!
I'll cut a release once CI passes
from ember-cli-fastboot-testing.
0.0.11 updated fastboot dependency to 2.x. There's currently an incompatibility issue with fastboot 2.x and ember-fetch. See: ember-cli/ember-fetch#184 and ember-fastboot/ember-cli-fastboot#686
A best workaround for now is to lock fastboot to 1.x, by adding this to your package.json:
"resolutions": {
"fastboot": "^1.2.1"
}
from ember-cli-fastboot-testing.
Actually, I tried upgrading first 0.0.11
and then 0.0.13
, it was jumping from 0.0.13
to 0.0.14
where it blew up.
from ember-cli-fastboot-testing.
Ok, so just to confirm 0.0.11
and 0.0.13
work in your app? It's 0.0.14
that errors?
from ember-cli-fastboot-testing.
fwiw in my app it was the 0.0.11 and the update to fastboot 2.x. That resulted in "abortcontroller-polyfill/dist/cjs-ponyfill" error on build time.
@0xadada case might be different, since it seems that's a runtime error (with a failed assertion and an infinite rendering)
from ember-cli-fastboot-testing.
Thanks @CvX - You used yarn resolutions to fix it?
from ember-cli-fastboot-testing.
You used yarn resolutions to fix it?
That's right. I'm currently using ember-cli-fastboot-testing 0.0.14 and fastboot locked via resolutions to "^1.2.1".
from ember-cli-fastboot-testing.
Ok, so just to confirm
0.0.11
and0.0.13
work in your app? It's0.0.14
that errors? @ryanto
Yup, going from 0.0.13
to 0.0.14
is where i'm seeing the failures. I was able to get 0.0.13
working after doing a completely new yarn
install. I'll edit the OP to clarify.
from ember-cli-fastboot-testing.
@ryanto @CvX the package versions output by yarn
for this repo:
$ grep '"version"' -B 1 node_modules/*fastboot*/package.json
node_modules/ember-cli-fastboot-testing/package.json- "name": "ember-cli-fastboot-testing",
node_modules/ember-cli-fastboot-testing/package.json: "version": "0.0.13",
--
node_modules/ember-cli-fastboot/package.json- "name": "ember-cli-fastboot",
node_modules/ember-cli-fastboot/package.json: "version": "2.0.4",
--
node_modules/fastboot-express-middleware/package.json- "name": "fastboot-express-middleware",
node_modules/fastboot-express-middleware/package.json: "version": "1.2.0",
--
node_modules/fastboot-transform/package.json- "name": "fastboot-transform",
node_modules/fastboot-transform/package.json: "version": "0.1.3",
--
node_modules/fastboot/package.json- "name": "fastboot",
node_modules/fastboot/package.json: "version": "1.2.1",
from ember-cli-fastboot-testing.
Ok great. Thanks for the detailed info!
I added some new features related to network requests in 0.0.14 that probably need some better tests.
I'll get that fixed, but for now use 0.0.13
since that appears to be working
from ember-cli-fastboot-testing.
@ryanto if you point me in the right direction, i could potentially add some tests later this week.
from ember-cli-fastboot-testing.
@ryanto oh whoa, i found something even more interesting: If i run ember test
it passes, but If i enable code coverage, it fails with a different error related to networking.
version 0.0.13
$ ember test --filter "FastBoot | Welcome" # PASSes test
$ COVERAGE=true ember test --filter "FastBoot | Welcome" # PASSes test
version 0.0.14
$ ember test --filter "FastBoot | Welcome" # PASSes test
$ COVERAGE=true ember test --filter "FastBoot | Welcome" # FAIL test
the error is as follows:
not ok 202 Chrome 74.0 - [undefined ms] - Global error: Uncaught InvalidStateError: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'json'). at http://localhost:7357/228108987734153/tests/index.html?hidepassed, line 96
After execution of test: ember-qunit: Ember.onerror validation: Ember.onerror is functioning properly
---
Log: |
{ type: 'error',
testContext:
{ id: 201,
name:
'ember-qunit: Ember.onerror validation: Ember.onerror is functioning properly',
items: [],
state: 'complete' },
text:
'Uncaught InvalidStateError: Failed to read the \'responseText\' property from \'XMLHttpRequest\': The value is only accessible if the object\'s \'responseType\' is \'\' or \'text\' (was \'json\'). at http://localhost:7357/228108987734153/tests/index.html?hidepassed, line 96\n' }
...
I have a strong feeling that when ember-cli-code-coverage sends the coverage report back, it uses an AJAX request that has been modified to interact with fastboot.
To work, this addon has to post coverage results back to a middleware at
/write-coverage
.
https://github.com/kategengler/ember-cli-code-coverage/#create-a-passthrough-when-intercepting-all-ajax-requests-in-tests
from ember-cli-fastboot-testing.
Thanks @0xadada !
Edit: Removed my question because I saw you already answered it!
from ember-cli-fastboot-testing.
@ryanto yup, heres the breakdown
version 0.0.13
$ ember test --filter "FastBoot | Welcome" # PASSes test
$ COVERAGE=true ember test --filter "FastBoot | Welcome" # PASSes test
version 0.0.14
$ ember test --filter "FastBoot | Welcome" # PASSes test
$ COVERAGE=true ember test --filter "FastBoot | Welcome" # FAIL test
from ember-cli-fastboot-testing.
Thanks! I just noticed you already answered that question above!!!
I think I might have figured it out, can you do me a favor and try out this branch? #46
from ember-cli-fastboot-testing.
@ryanto yup, that worked 👌 🎉
from ember-cli-fastboot-testing.
@ryanto out of curiosity, how do you start the app and step your debugger through this? some magickal incantation of node --inspect-brk ./node_modules/.bin/ember serve
or some such, and then attach chrome inspector?
from ember-cli-fastboot-testing.
@0xadada Yup, I made a video about this exact sort of thing! https://embermap.com/video/faster-node-debugging
from ember-cli-fastboot-testing.
Alright this is fixed and released in 0.0.15
from ember-cli-fastboot-testing.
Btw, thanks for doing all the debugging on this one @0xadada
from ember-cli-fastboot-testing.
I'm hitting this with the following:
ember-cli-fastboot 3.3.2
├── fastboot 3.3.2
└─┬ fastboot-express-middleware 3.3.2
└── fastboot 3.3.2
ember-cli-fastboot-testing 0.6.0
└── fastboot 3.3.2
from ember-cli-fastboot-testing.
I believe the issue here is an undeclared dependency on abortcontroller-polyfill
from ember-cli-fastboot-testing.
Thanks runspired. What's the fix? Should we have abortcontroller-polyfill
as a dep of this library?
from ember-cli-fastboot-testing.
@ryanto I think it needs be a dep but I forget if this library for ember-fetch was the culprit, I ended up ripping out ember-fetch and we're still testing with this library in ember-data so I'm guessing it was ember-fetch.
from ember-cli-fastboot-testing.
Related Issues (20)
- Does not work with path=dist HOT 5
- Allow user to access fastboot instance in fastboot-testing.js config HOT 5
- Allow user to pass functions inside the `options` parameter while calling `visit` HOT 1
- Support for ember projects with a rootURL containing a subdirectory HOT 3
- Deprecation Warning in Ember 3.9+ HOT 2
- Visit helper not returning correct content upon using `this.replaceWith` for redirection HOT 4
- FastBoot.distPath returns deleted path upon running `ember test` HOT 2
- Allow for custom host in mockServer calls HOT 2
- mockServer.get not working HOT 6
- Error messages are not escaped
- Build fails with latest Babel.js
- A future for this repo. HOT 4
- najax not present when using jQuery in v0.4/v0.5 HOT 1
- Add ability to specify response headers in mocked responses HOT 1
- Use config/fastboot.js instead of separate config/fastboot-testing.js HOT 2
- Config not working HOT 5
- [0.6.0] req.headers.origin undefined in CLI mode
- Skip outputReady in production builds HOT 4
- Cut new release v0.6.1 HOT 4
- Monorepo support HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-fastboot-testing.