Showing 1 of 2 files from the diff.
Other files ignored by Codecov
test/hooks.js has changed.

@@ -303,7 +303,7 @@
Loading
303 303
				const modifiedResponse = await hook(
304 304
					this.request,
305 305
					this._options,
306 -
					response.clone()
306 +
					this._decorateResponse(response.clone())
307 307
				);
308 308
309 309
				if (modifiedResponse instanceof globals.Response) {
@@ -311,11 +311,7 @@
Loading
311 311
				}
312 312
			}
313 313
314 -
			if (this._options.parseJson) {
315 -
				response.json = async () => {
316 -
					return this._options.parseJson(await response.text());
317 -
				};
318 -
			}
314 +
			this._decorateResponse(response);
319 315
320 316
			if (!response.ok && this._options.throwHttpErrors) {
321 317
				throw new HTTPError(response);
@@ -401,6 +397,16 @@
Loading
401 397
		return 0;
402 398
	}
403 399
400 +
	_decorateResponse(response) {
401 +
		if (this._options.parseJson) {
402 +
			response.json = async () => {
403 +
				return this._options.parseJson(await response.text());
404 +
			};
405 +
		}
406 +
407 +
		return response;
408 +
	}
409 +
404 410
	async _retry(fn) {
405 411
		try {
406 412
			return await fn();
Files Coverage
index.js 100.00%
Project Totals (1 files) 100.00%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading