Skip to content

Conversation

@joshsmith
Copy link
Contributor

What's in this PR?

Attempting to add code coverage. Doesn't work yet.

References

Fixes #564

@joshsmith
Copy link
Contributor Author

No coverage being generated. Trying with COVERAGE=true ember test. Would appreciate someone else pulling down or spotting what I'm doing wrong.

@emosher
Copy link
Contributor

emosher commented Oct 30, 2016

I tried this too. What error are you seeing? For me it seems to chug along just fine until this happens:

ok 898 PhantomJS 1.9 - Unit | Utility | mention parser: it returns the unmodified task string when there are no mentions
not ok 899 PhantomJS 1.9 - Global error: INVALID_STATE_ERR: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable. at http://localhost:7357/5484/tests/index.html?hidepassed, line 1071
    ---
        Log: |
            { type: 'error',
              text: 'INVALID_STATE_ERR: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable. at http://localhost:7357/5484/tests/index.html?hidepassed, line 1071\n' }
    ...
not ok 900 PhantomJS 1.9 - Unit | Utility | mention parser: global failure
    ---
        actual: >
            null
        stack: >
            http://localhost:7357/5484/tests/index.html?hidepassed:1071
        message: >
            INVALID_STATE_ERR: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable.
        Log: |
    ...

1..900
# tests 900
# pass  898
# skip  0
# fail  2

It then has another block saying "request aborted" and some additional error spewage.

@joshsmith
Copy link
Contributor Author

@emosher I don't actually see an error or even any output at all. Nothing happens. No coverage generated whatsoever.

@joshsmith joshsmith force-pushed the 564-add-code-coverage branch from 599598d to 117bafb Compare January 3, 2017 00:08
@joshsmith
Copy link
Contributor Author

We need to run with COVERAGE=true.

Also concerned that this is causing issues:

// in mirage/config.js

  this.passthrough('/write-coverage');
  this.namespace = 'api';  // It's important that the passthrough for coverage is before the namespace, otherwise it will be prefixed.

We don't use namespace, but wondering if perhaps we should be.

@joshsmith
Copy link
Contributor Author

@begedin thoughts on the above comment?

@begedin
Copy link
Contributor

begedin commented Jan 25, 2017

@joshsmith I'm not sure how the namespace would interact with our actual app setup (where api. is just part of the URL). We should probably give it a try to see how it works.

@joshsmith
Copy link
Contributor Author

Actually it looks like namespace is not a subdomain but something like /baz in foo.com/baz.

@joshsmith joshsmith force-pushed the 564-add-code-coverage branch from 117bafb to b104876 Compare January 25, 2017 18:11
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling d21f853 on 564-add-code-coverage into ** on develop**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling fa0d5c5 on 564-add-code-coverage into ** on develop**.

@joshsmith joshsmith force-pushed the 564-add-code-coverage branch from fa0d5c5 to 0e68e85 Compare January 25, 2017 19:32
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 0e68e85 on 564-add-code-coverage into ** on develop**.

@joshsmith joshsmith merged commit 2e563fa into develop Jan 25, 2017
@joshsmith joshsmith deleted the 564-add-code-coverage branch January 25, 2017 19:38
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

Successfully merging this pull request may close these issues.

5 participants