Skip to content

Commit

Permalink
Document the coverage POST request
Browse files Browse the repository at this point in the history
  • Loading branch information
jrjohnson committed Jul 7, 2015
1 parent e0de2c4 commit aed38d7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,28 @@ It should be noted that given the multitude of transformations that the javascri

In fact, there is current no direct mapping between the `es6` module names in the lcov output and the original input files.

### Reporters and Testing Mocks

When tests are complete an HTTP POST request is sent to the ember-cli express server to initiate the report writing process. This request may get intercepted if you are using a mocking library like ember-cli-mirage or Pretender. You will need to configure these libraries to "passthrough" the request.

If you are using Pretender directly add
```js
this.post(
'/write-blanket-coverage',
this.passthrough
);
```

For ember-cli-mirage add this to your config.js

```js
this.pretender.post.call(
this.pretender,
'/write-blanket-coverage',
this.pretender.passthrough
);
```

## Usage

Run `ember server`, navigate to the application url [/tests](http://localhost:4200/tests) (e.g. localhost:4200/tests) and select the "Enable coverage" checkbox.
Expand Down

0 comments on commit aed38d7

Please sign in to comment.