Skip to content

Commit 5304414

Browse files
committed
fix: output good message to the console if coverage not found
1 parent 20b87e3 commit 5304414

File tree

7 files changed

+648
-15
lines changed

7 files changed

+648
-15
lines changed

Diff for: README.md

+5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ If you have instrumented your application's code and see the `window.__coverage_
5353

5454
That should be it!
5555

56+
### More information
57+
58+
- Read [Cypress Code Coverage: Instrumenting code](https://on.cypress.io/code-coverage#Instrumenting-code) guide
59+
- Watch [Code coverage](https://youtu.be/C8g5X4vCZJA) webinar
60+
5661
### App vs unit tests
5762

5863
You need to instrument your web application. This means that when the test does `cy.visit('localhost:3000')` any code the `index.html` requests should be instrumented by YOU. See [Examples](#examples) section for advice, usually you need to stick `babel-plugin-istanbul` into your pipeline somewhere.

Diff for: examples/use-webpack/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
> Instruments the built bundle using Webpack
44
55
Webpack uses [webpack.config.js](webpack.config.js) to build the bundle from [src/index.js](src/index.js) into `dist/main.js`, loaded from [dist/index.html](dist/index.html). The [cypress/integration/spec.js](cypress/integration/spec.js) also uses one of the functions from [src/calc.js](src/calc.js) directly. The final coverage includes both E2E and unit test coverage information.
6+
7+
**Note:** this project requires `npm run build` before running `npm run dev`.

Diff for: examples/use-webpack/dist/index.html

-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
<title>Webpack example</title>
55
<style>
66
.console-log-div {
7-
width: 95% !important;
87
background-color: #efefef;
98
}
109
#log {
11-
margin: 10px 0px;
1210
display: block;
1311
white-space: pre;
1412
font-family: monospace;

0 commit comments

Comments
 (0)