Skip to content

Commit 6760dc4

Browse files
committed
Update with latest master
2 parents 98fdf48 + a4ac9de commit 6760dc4

File tree

17 files changed

+234
-129
lines changed

17 files changed

+234
-129
lines changed

.circleci/config.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
lint:
1010
description: Checks the code formatting
1111
docker:
12-
- image: cimg/node:22.1.0
12+
- image: cimg/node:22.8.0
1313
environment:
1414
# we don't need Cypress to check code style
1515
CYPRESS_INSTALL_BINARY: '0'
@@ -71,7 +71,7 @@ jobs:
7171
publish:
7272
description: Publishes the new version of the plugin to NPM
7373
docker:
74-
- image: cimg/node:22.1.0
74+
- image: cimg/node:22.8.0
7575
environment:
7676
# we don't need Cypress to do the release
7777
CYPRESS_INSTALL_BINARY: '0'
@@ -152,6 +152,7 @@ workflows:
152152
- exclude-files
153153
- frontend
154154
- fullstack
155+
- multiple-backends
155156
- one-spec
156157
- same-folder
157158
- support-files
@@ -179,6 +180,7 @@ workflows:
179180
- test-exclude-files
180181
- test-frontend
181182
- test-fullstack
183+
- test-multiple-backends
182184
- test-one-spec
183185
- test-same-folder
184186
- test-support-files

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,18 @@ if (global.__coverage__) {
214214
}
215215
```
216216

217+
Or if you have multiple servers from which you are wanting to gather code coverage, you can pass an array to `url` as well:
218+
219+
```json
220+
{
221+
"env": {
222+
"codeCoverage": {
223+
"url": ["http://localhost:3000/__coverage__", "http://localhost:3001/__coverage__"]
224+
}
225+
}
226+
}
227+
```
228+
217229
That should be enough - the code coverage from the server will be requested at the end of the test run and merged with the client-side code coverage, producing a combined report.
218230

219231
### expectBackendCoverageOnly

package-lock.json

+46-65
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@cypress/webpack-preprocessor": "^6.0.0",
5555
"chalk": "4.1.2",
5656
"dayjs": "1.11.13",
57-
"debug": "4.3.6",
57+
"debug": "4.3.7",
5858
"execa": "4.1.0",
5959
"globby": "11.1.0",
6060
"istanbul-lib-coverage": "^3.0.0",
@@ -78,7 +78,7 @@
7878
"rimraf": "6.0.1",
7979
"semantic-release": "17.4.7",
8080
"serve": "14.2.1",
81-
"start-server-and-test": "2.0.5",
81+
"start-server-and-test": "2.0.7",
8282
"webpack": "^5.68.0",
8383
"webpack-cli": "^5.1.4"
8484
}

support-utils.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,9 @@ const filterSupportFilesFromCoverage = (
137137
function fixSourcePaths(coverage) {
138138
Object.values(coverage).forEach((file) => {
139139
const { path: absolutePath, inputSourceMap } = file
140+
if (!inputSourceMap) return
140141
const fileName = /([^\/\\]+)$/.exec(absolutePath)[1]
141-
if (!inputSourceMap || !fileName) return
142+
if (!fileName) return
142143

143144
if (inputSourceMap.sourceRoot) inputSourceMap.sourceRoot = ''
144145
inputSourceMap.sources = inputSourceMap.sources.map((source) =>

0 commit comments

Comments
 (0)