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

No Coverage generated got following error #21

Closed
akhileshk opened this issue Jul 25, 2016 · 4 comments
Closed

No Coverage generated got following error #21

akhileshk opened this issue Jul 25, 2016 · 4 comments

Comments

@akhileshk
Copy link

After ember-cli-code-coverage used following command "COVERAGE=true ember test" to run the test
getting following error:

{ type: 'error',
text: 'Error: Pretender intercepted POST /write-coverage but no handler was defined for this type of request at http://localhost:7357/assets/vendor.js, line 68809\n' }

Do I need to do any configuration on my end?

//env:
Package.json
"devDependencies": {
"broccoli-asset-rev": "^2.2.0",
"ember-ajax": "0.7.1",
"ember-cli": "2.5.0",
"ember-cli-app-version": "^1.0.0",
"ember-cli-babel": "^5.1.5",
"ember-cli-code-coverage": "0.2.2",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-htmlbars": "^1.0.1",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.3.1",
"ember-cli-pretender": "0.6.0",
"ember-cli-qunit": "^1.1.0",
"ember-cli-release": "0.2.8",
"ember-cli-sri": "^2.0.0",
"ember-cli-uglify": "^1.2.0",
"ember-disable-proxy-controllers": "^1.0.1",
"ember-export-application-global": "^1.0.4",
"ember-load-initializers": "0.5.1",
"ember-resolver": "^2.0.3",
"loader.js": "4.0.10"
}
Bower.json:
"dependencies": {
"ember": "2.5.0",
"ember-cli-shims": "0.1.0",
"ember-cli-test-loader": "0.2.2",
"ember-load-initializers": "0.1.7",
"ember-qunit-notifications": "0.1.0",
"jquery": "1.11.3",
"loader.js": "^3.5.0",
"qunit": "~1.20.0",
"pretender": "^0.12.0",
"bootstrap": "3.1.1",
"moment": "~2.11.1",
"markdown": "~0.5.0",
"bootstrap-tokenfield": "~0.12.1"
},

@akhileshk
Copy link
Author

akhileshk commented Jul 26, 2016

this is what worked for me, as the App was not using mirage
this.post('/write-coverage', this.passthrough);

@akhileshk
Copy link
Author

akhileshk commented Jul 26, 2016

@benoror @kategengler
With the Istanbul, one can instrument the code base and run the test latter on the instrumented code, can we do some thing similar with this plugin for ember app.
The document does mentioned that :
"it instruments your application code as part of the build, when enabled."
so how do we enable code instrumentation during ember build, and generate instrumented code?,

@kategengler
Copy link
Collaborator

COVERAGE=true is the part that enables instrumentation of the code. You have that in the command you ran.

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

3 participants