Comments (14)
Are you by any chance using ember-cli-mirage
?
I noticed that the request.onload
callback never got called. This might be caused by pretenderjs (even though the request was made and I had a passthrough rule in mirage/config.js
).
In my codebase in tests/helpers/destroy-app.js
there was a missing line server.shutdown();
.
Here the full file which solved the issue for me:
tests/helpers/destroy-app.js
import Ember from 'ember';
export default function destroyApp(application) {
Ember.run(application, 'destroy');
server.shutdown();
}
from ember-cli-code-coverage.
I've seen this as well but only with addons that have acceptance tests. If I skip the acceptance test then the run completes and reports coverage.
from ember-cli-code-coverage.
The issue is back for me with 0.3.9 but 0.3.8 is still good
from ember-cli-code-coverage.
My builds stopped working with the same behaviour, it seemed to appear randomly. I guess this might be a dependency issue?
from ember-cli-code-coverage.
@rox163 Thank you! That was causing the freezing for me too.
from ember-cli-code-coverage.
That was exactly my problem too. Thank you. 😲
from ember-cli-code-coverage.
Still having this issue with version 0.3.9 even with the above solution. Reverting to 0.2.2 fixed it for me.
from ember-cli-code-coverage.
Hopefully solved by #87
from ember-cli-code-coverage.
#87 has been released in 0.3.10
from ember-cli-code-coverage.
Duplicates with #88?
from ember-cli-code-coverage.
I opened this ticket over a month before 88.
Anyways, the hanging issue is fixed for me after upgrading to 0.3.10 ( and previously having applied topaxi's fix ).
from ember-cli-code-coverage.
Was still seeing this in 0.3.10. I'm using mostly default generated tests with ember 2.10 and ember-cli-mirage. It must have been a problem with a mirage instance never getting shutdown and hanging around. Resolved it by adding if(server !== undefined) { server.shutdown(); }
to beforeEach and afterEach in each acceptance test file. As in,
module('Acceptance: Metro', {
beforeEach: function() {
if(server !== undefined) { server.shutdown(); }
application = startApp();
originalConfirm = window.confirm;
window.confirm = function() {
confirmCalledWith = [].slice.call(arguments);
return true;
};
},
afterEach: function() {
Ember.run(application, 'destroy');
window.confirm = originalConfirm;
confirmCalledWith = null;
if(server !== undefined) { server.shutdown(); }
}
});
Hope this helps someone else having the same problem.
from ember-cli-code-coverage.
@topaxi - that mirage server.shutdown()
trick saved my ass. If you're ever in the Chicago area, your drink's on me.
from ember-cli-code-coverage.
I had the same problem. Because of Integration tests where I use New Testing API.
I had to close mirage server (server.shutdown()
) after every Integration tests. Here is quite neat solution for folks that will strugle with this in the future:
https://gist.github.com/tniezurawski/907d0fa83a7a621146add3871d1827ca
from ember-cli-code-coverage.
Related Issues (20)
- Seems to break when using the ember-concurrency new api HOT 5
- Unexpected token { error
- [QUERY] Is it possible to generate the coverage for a specific file/spec module (integration) HOT 2
- Issue with migration to v2.0.0
- No coverage report generated when used with @embroider/compat@^2.1.0 HOT 10
- Exclude app files from ember engine? tried with many glob patterns nothing is working..
- Socket timeouts POSTing to /write-coverage when running tests in CI mode HOT 3
- Not respecting "inputSourceMap" field from reported coverage data (fails for .gjs - ember-template-imports) HOT 2
- New release? HOT 10
- Coverage not collected in Embroider >3.1 HOT 6
- Is it possible to get coverage of hbs files with qunits and this coverage tool? HOT 1
- Issues with first-class component templates? HOT 12
- Embroider Tests are verifying that we have no coverage data HOT 1
- Version 2.0.1 not published HOT 1
- Coverage fails in dev mode (ember serve) on 2.0.3 HOT 2
- Coverage for gjs/gts files do not work for embroider apps HOT 17
- Add workflow that creates a dist branch HOT 2
- Coverage is not produced when `-s` is not included
- Ability to collect and report coverage in development
- Use on WSL test runs
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-code-coverage.