Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(coverage): trim URL parameters from file paths in istanbul coverage #2232

Merged

Conversation

AriPerkkio
Copy link
Member

Vitest transforms files on-demand. Only files that are loaded are instrumented. nyc, c8 and I think also jest instruments files before the test runner is even run. This introduces new issue for istanbul, where we may give it filenames that contain query parameters, e.g. Counter.component.ts?vue&type=script&src=true&lang.ts. These filenames end up as is in the coverage summaries and are used as filenames when writing reports in the file system. The HTML reporter of istanbul-reports generates links such as <a href="Counter.component.ts?vue&type=script&src=true&lang.ts.html"> which cannot be opened on browser.

I added a test case where this issue can be reproduced, but as I have no experience in Vue, please check it thoroughly.

Before:

--------------------------------------------------------|---------|----------|---------|---------|-------------------
File                                                    | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
--------------------------------------------------------|---------|----------|---------|---------|-------------------
All files                                               |      50 |    57.14 |   47.36 |   48.38 |                   
 src                                                    |   52.17 |       40 |      50 |      50 |                   
  Defined.vue                                           |     100 |      100 |     100 |     100 |                   
  Hello.vue                                             |     100 |      100 |     100 |     100 |                   
  index.ts                                              |     100 |      100 |     100 |     100 |                   
  untested-file.ts                                      |       0 |        0 |       0 |       0 | 7-32              
  utils.ts                                              |   57.14 |        0 |      60 |   57.14 | 11,16,23          
 src/Counter                                            |   44.44 |      100 |   42.85 |   44.44 |                   
  Counter.component.ts                                  |       0 |      100 |       0 |       0 | 7-17              
  Counter.component.ts?vue&type=script&src=true&lang.ts |      75 |      100 |   66.66 |      75 | 13                
  Counter.vue                                           |     100 |      100 |     100 |     100 |                   
--------------------------------------------------------|---------|----------|---------|---------|-------------------

After:

-----------------------|---------|----------|---------|---------|-------------------
File                   | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-----------------------|---------|----------|---------|---------|-------------------
All files              |   57.14 |    57.14 |   56.25 |   55.55 |                   
 src                   |   52.17 |       40 |      50 |      50 |                   
  Defined.vue          |     100 |      100 |     100 |     100 |                   
  Hello.vue            |     100 |      100 |     100 |     100 |                   
  index.ts             |     100 |      100 |     100 |     100 |                   
  untested-file.ts     |       0 |        0 |       0 |       0 | 7-32              
  utils.ts             |   57.14 |        0 |      60 |   57.14 | 11,16,23          
 src/Counter           |      80 |      100 |      75 |      80 |                   
  Counter.component.ts |      75 |      100 |   66.66 |      75 | 13                
  Counter.vue          |     100 |      100 |     100 |     100 |                   
-----------------------|---------|----------|---------|---------|-------------------
HTML coverage report

image

image

image

Coverage report from the reproduction repository (@Gnuk 👋)

Coverage report jhipster
---------------------------------------|---------|----------|---------|---------|-------------------
File                                   | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
---------------------------------------|---------|----------|---------|---------|-------------------
All files                              |    99.6 |      100 |   99.17 |   99.56 |                   
 common/domain                         |     100 |      100 |     100 |     100 |                   
  Memoizer.ts                          |     100 |      100 |     100 |     100 |                   
  Optional.ts                          |     100 |      100 |     100 |     100 |                   
 common/primary/app                    |     100 |      100 |     100 |     100 |                   
  App.vue                              |     100 |      100 |     100 |     100 |                   
 common/primary/header                 |     100 |      100 |     100 |     100 |                   
  Header.component.ts                  |     100 |      100 |     100 |     100 |                   
  Header.vue                           |     100 |      100 |     100 |     100 |                   
 common/primary/timeout                |     100 |      100 |     100 |     100 |                   
  Timeout.ts                           |     100 |      100 |     100 |     100 |                   
 common/primary/toast                  |     100 |      100 |     100 |     100 |                   
  Toast.component.ts                   |     100 |      100 |     100 |     100 |                   
  Toast.vue                            |     100 |      100 |     100 |     100 |                   
  ToastType.ts                         |     100 |      100 |     100 |     100 |                   
 common/secondary                      |     100 |      100 |     100 |     100 |                   
  ConsoleLogger.ts                     |     100 |      100 |     100 |     100 |                   
 common/secondary/alert                |     100 |      100 |     100 |     100 |                   
  AlertType.ts                         |     100 |      100 |     100 |     100 |                   
  MittAlertBus.ts                      |     100 |      100 |     100 |     100 |                   
  MittAlertListener.ts                 |     100 |      100 |     100 |     100 |                   
 http                                  |     100 |      100 |     100 |     100 |                   
  AxiosHttp.ts                         |     100 |      100 |     100 |     100 |                   
 loader/primary                        |     100 |      100 |     100 |     100 |                   
  Loader.ts                            |     100 |      100 |     100 |     100 |                   
 module/domain                         |     100 |      100 |     100 |     100 |                   
  ModuleSlug.ts                        |     100 |      100 |     100 |     100 |                   
  Modules.ts                           |     100 |      100 |     100 |     100 |                   
 module/domain/landscape               |     100 |      100 |     100 |     100 |                   
  Landscape.ts                         |     100 |      100 |     100 |     100 |                   
  LandscapeFeature.ts                  |     100 |      100 |     100 |     100 |                   
  LandscapeFeatureSlug.ts              |     100 |      100 |     100 |     100 |                   
  LandscapeModule.ts                   |     100 |      100 |     100 |     100 |                   
  LandscapeSelectionTree.ts            |     100 |      100 |     100 |     100 |                   
  LandscapeUnselectionTree.ts          |     100 |      100 |     100 |     100 |                   
 module/primary                        |     100 |      100 |     100 |     100 |                   
  PropertyValue.ts                     |     100 |      100 |     100 |     100 |                   
 module/primary/landscape              |   99.54 |      100 |   98.78 |   99.53 |                   
  Landscape.component.ts               |     100 |      100 |     100 |     100 |                   
  Landscape.vue                        |   96.55 |      100 |    92.3 |   96.55 | 57                
  LandscapeConnector.ts                |     100 |      100 |     100 |     100 |                   
  LandscapeConnectorsSize.ts           |     100 |      100 |     100 |     100 |                   
 module/primary/landscape-module       |     100 |      100 |     100 |     100 |                   
  LandscapeModule.component.ts         |     100 |      100 |     100 |     100 |                   
  LandscapeModule.vue                  |     100 |      100 |     100 |     100 |                   
 module/primary/module-parameters      |     100 |      100 |     100 |     100 |                   
  ModuleParameters.component.ts        |     100 |      100 |     100 |     100 |                   
  ModuleParameters.vue                 |     100 |      100 |     100 |     100 |                   
 module/primary/module-properties-form |     100 |      100 |     100 |     100 |                   
  ModulePropertiesForm.component.ts    |     100 |      100 |     100 |     100 |                   
  ModulePropertiesForm.vue             |     100 |      100 |     100 |     100 |                   
 module/primary/modules-patch          |   98.29 |      100 |      96 |   98.17 |                   
  ComponentModulePatch.ts              |     100 |      100 |     100 |     100 |                   
  ComponentModulePatchCategory.ts      |     100 |      100 |     100 |     100 |                   
  ComponentModulesPatch.ts             |     100 |      100 |     100 |     100 |                   
  ModulesPatch.component.ts            |     100 |      100 |     100 |     100 |                   
  ModulesPatch.vue                     |   86.36 |      100 |   66.66 |   85.71 | 8,10,37           
 module/primary/project-actions        |     100 |      100 |     100 |     100 |                   
  ProjectActions.component.ts          |     100 |      100 |     100 |     100 |                   
  ProjectActions.vue                   |     100 |      100 |     100 |     100 |                   
 module/primary/tag-filter             |     100 |      100 |     100 |     100 |                   
  TagFilter.component.ts               |     100 |      100 |     100 |     100 |                   
  TagFilter.vue                        |     100 |      100 |     100 |     100 |                   
 module/secondary                      |     100 |      100 |     100 |     100 |                   
  RestAppliedModule.ts                 |     100 |      100 |     100 |     100 |                   
  RestLandscape.ts                     |     100 |      100 |     100 |     100 |                   
  RestLandscapeElement.ts              |     100 |      100 |     100 |     100 |                   
  RestLandscapeFeature.ts              |     100 |      100 |     100 |     100 |                   
  RestLandscapeLevel.ts                |     100 |      100 |     100 |     100 |                   
  RestLandscapeModule.ts               |     100 |      100 |     100 |     100 |                   
  RestModule.ts                        |     100 |      100 |     100 |     100 |                   
  RestModulePropertiesDefinitions.ts   |     100 |      100 |     100 |     100 |                   
  RestModulePropertyDefinition.ts      |     100 |      100 |     100 |     100 |                   
  RestModuleToApply.ts                 |     100 |      100 |     100 |     100 |                   
  RestModules.ts                       |     100 |      100 |     100 |     100 |                   
  RestModulesRepository.ts             |     100 |      100 |     100 |     100 |                   
  RestModulesToApply.ts                |     100 |      100 |     100 |     100 |                   
  RestProjectFoldersRepository.ts      |     100 |      100 |     100 |     100 |                   
  RestProjectHistory.ts                |     100 |      100 |     100 |     100 |                   
---------------------------------------|---------|----------|---------|---------|-------------------

=============================== Coverage summary ===============================
Statements   : 99.6% ( 996/1000 )
Branches     : 100% ( 175/175 )
Functions    : 99.17% ( 483/487 )
Lines        : 99.56% ( 920/924 )
================================================================================

@AriPerkkio AriPerkkio changed the title fix(coverage): trim URL parameters from file paths in istanbul coverage fix(coverage): trim URL parameters from file paths in istanbul coverage Oct 29, 2022
@AriPerkkio
Copy link
Member Author

Windows CI seems to fail on coverage-c8 tests now that the reproduction test case was added.

test/coverage-test test:  % Coverage report from c8
test/coverage-test test:  ❯ Object.openSync ../../../../../../node:fs:594:3
test/coverage-test test: ⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯
test/coverage-test test:  ❯ FileWriter.writeFile ../../node_modules/.pnpm/istanbul-lib-report@3.0.0/node_modules/istanbul-lib-report/lib/file-writer.js:185:41
test/coverage-test test: Error: ENOENT: no such file or directory, open 'D:\a\vitest\vitest\test\coverage-test\coverage\coverage-test\src\Counter\Counter.component.ts?vue&type=script&src=true&lang.ts.html'

Should we disable the test for now or wait for #2181?

@sheremet-va sheremet-va merged commit 840f5c5 into vitest-dev:main Oct 31, 2022
@AriPerkkio AriPerkkio deleted the fix/istanbul-file-queryparams branch October 31, 2022 09:59
fwouts pushed a commit to fwouts/previewjs that referenced this pull request Oct 31, 2022
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [vitest](https://togithub.com/vitest-dev/vitest) | [`0.24.3` ->
`0.24.4`](https://renovatebot.com/diffs/npm/vitest/0.24.3/0.24.4) |
[![age](https://badges.renovateapi.com/packages/npm/vitest/0.24.4/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/vitest/0.24.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/vitest/0.24.4/compatibility-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/vitest/0.24.4/confidence-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vitest-dev/vitest</summary>

###
[`v0.24.4`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.24.4)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.3...v0.24.4)

#####    🚀 Features

- **vite-node**: Don't exit on uncaughtException in watch mode  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[vitest-dev/vitest#2186

#####    🐞 Bug Fixes

- Add/Update `repository` properties in `package.json`  -  by
[@&#8203;silverwind](https://togithub.com/silverwind) in
[vitest-dev/vitest#2151
- Ignore benchmark.reporters in getSerializableConfig  -  by
[@&#8203;kainstar](https://togithub.com/kainstar) in
[vitest-dev/vitest#2164
- Improve config's default exclude  -  by
[@&#8203;haikyuu](https://togithub.com/haikyuu) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2188
- Always use node condition  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#1919
- Clear terminal output before running tests, show errors in correct
order  -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2228
- Improve compatibility with native Node CJS resolution  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2226
- Don't use resolved paths if they don't actually exist  -  by
[@&#8203;simon-abbott](https://togithub.com/simon-abbott) in
[vitest-dev/vitest#1868
-   **cli**:
- Set inputNamePattern to RegExp source instead of string  -  by
[@&#8203;rafedramzi](https://togithub.com/rafedramzi) in
[vitest-dev/vitest#2201
- Normalize argument path  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[vitest-dev/vitest#2180
-   **coverage**:
- Trim URL parameters from file paths in istanbul coverage  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#2232
- Trim URL parameters from file paths in c8 coverage  -  by
[@&#8203;OrestHk](https://togithub.com/OrestHk) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2181
-   **reporter**:
- Load custom reporter using `executeFile`  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[vitest-dev/vitest#2184
-   **vitest**:
- Return detailed error when using toHaveReturnedWith  -  by
[@&#8203;azaleta](https://togithub.com/azaleta) in
[vitest-dev/vitest#2163

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.3...v0.24.4)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/fwouts/previewjs).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC45LjIiLCJ1cGRhdGVkSW5WZXIiOiIzNC45LjIifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
ivarconr pushed a commit to Unleash/unleash that referenced this pull request Nov 10, 2022
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [vitest](https://togithub.com/vitest-dev/vitest) | [`0.24.3` ->
`0.25.1`](https://renovatebot.com/diffs/npm/vitest/0.24.3/0.25.1) |
[![age](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/compatibility-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/confidence-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vitest-dev/vitest</summary>

###
[`v0.25.1`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.1)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1)

#####    🚀 Features

- Add `vi.setConfig` helper  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2293
- Allow hooks to be executed in a stack or list  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2294

#####    🐞 Bug Fixes

- Always rewrite defined jsdom keys  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2290
- Default reporter regression  -  by
[@&#8203;antfu](https://togithub.com/antfu) in
[vitest-dev/vitest#2292
- Don't fail `bench` when using options  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[vitest-dev/vitest#2295

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1)

###
[`v0.25.0`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.0)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0)

#####    ✅ Builtin TypeChecking

In v0.25.0, Vitest allows you to write tests for your types, using
`expectTypeOf` or `assertType` syntaxes. By default all tests inside
`*.test-d.ts` files are considered type tests. Run `vitest typecheck` to
run type tests.

```ts
// my.test-d.ts
import { assertType, expectTypeOf } from 'vitest'
import { mount } from './mount.js'

test('my types work properly', () => {
  expectTypeOf(mount).toBeFunction()
  expectTypeOf(mount).parameter(0).toMatchTypeOf<{ name: string }>()

  // @&#8203;ts-expect-error name is a string
  assertType(mount({ name: 42 }))
})
```

Learn more at [the
documentation](https://vitest.dev/guide/testing-types.html) and this
[RFC](https://togithub.com/vitest-dev/vitest/issues/1954)

#####    🚨 Breaking Changes

- Return context in `startVitest()`  -  by
[@&#8203;antfu](https://togithub.com/antfu) in
[vitest-dev/vitest#2072

#####    🚀 Features

- `onTestFailed` hook  -  by [@&#8203;antfu](https://togithub.com/antfu)
in
[vitest-dev/vitest#2210
- Display error frame if present (like Vite)  -  by
[@&#8203;haikyuu](https://togithub.com/haikyuu) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2257
- Benchmark table report  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[vitest-dev/vitest#2179
- Add typechecking functionality  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) and
[@&#8203;antfu](https://togithub.com/antfu) in
[vitest-dev/vitest#2107

#####    🐞 Bug Fixes

- Clear full screen only in watch mode  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va)
[<samp>(c3d89)</samp>](https://togithub.com/vitest-dev/vitest/commit/c3d89504)
- Don't serialize symbols and immutables  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2266
- Use --conditions instead of -C  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2267
- Show correct stack trace in errors and console  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) and
[@&#8203;antfu](https://togithub.com/antfu) in
[vitest-dev/vitest#2248
- Align `.each` behavior with jest  -  by
[@&#8203;bartoszgolebiowski](https://togithub.com/bartoszgolebiowski)
and [@&#8203;antfu](https://togithub.com/antfu) in
[vitest-dev/vitest#2064
- Remove undefined values in options  -  by
[@&#8203;g4rry420](https://togithub.com/g4rry420) and
[@&#8203;antfu](https://togithub.com/antfu) in
[vitest-dev/vitest#2281
- **coverage**: Istanbul provider to preserve implicit else  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#2275

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0)

###
[`v0.24.5`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.24.5)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.4...v0.24.5)

#####    🚀 Features

- **vite-node**: Trigger beforeFullReload / beforePrune / invalidate
hook  -  by [@&#8203;ycmjason](https://togithub.com/ycmjason) in
[vitest-dev/vitest#2079

#####    🐞 Bug Fixes

- Respect folders with dot at the start, when mocking  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2244
- Prevent using mocks in rpc  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2254
- Show actual unhandled errors, serialize DOMErrors  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2253
- Load deps reporter  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[vitest-dev/vitest#2249

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.4...v0.24.5)

###
[`v0.24.4`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.24.4)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.3...v0.24.4)

#####    🚀 Features

- **vite-node**: Don't exit on uncaughtException in watch mode  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[vitest-dev/vitest#2186

#####    🐞 Bug Fixes

- Add/Update `repository` properties in `package.json`  -  by
[@&#8203;silverwind](https://togithub.com/silverwind) in
[vitest-dev/vitest#2151
- Ignore benchmark.reporters in getSerializableConfig  -  by
[@&#8203;kainstar](https://togithub.com/kainstar) in
[vitest-dev/vitest#2164
- Improve config's default exclude  -  by
[@&#8203;haikyuu](https://togithub.com/haikyuu) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2188
- Always use node condition  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#1919
- Clear terminal output before running tests, show errors in correct
order  -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2228
- Improve compatibility with native Node CJS resolution  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2226
- Don't use resolved paths if they don't actually exist  -  by
[@&#8203;simon-abbott](https://togithub.com/simon-abbott) in
[vitest-dev/vitest#1868
-   **cli**:
- Set inputNamePattern to RegExp source instead of string  -  by
[@&#8203;rafedramzi](https://togithub.com/rafedramzi) in
[vitest-dev/vitest#2201
- Normalize argument path  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[vitest-dev/vitest#2180
-   **coverage**:
- Trim URL parameters from file paths in istanbul coverage  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#2232
- Trim URL parameters from file paths in c8 coverage  -  by
[@&#8203;OrestHk](https://togithub.com/OrestHk) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2181
-   **reporter**:
- Load custom reporter using `executeFile`  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[vitest-dev/vitest#2184
-   **vitest**:
- Return detailed error when using toHaveReturnedWith  -  by
[@&#8203;azaleta](https://togithub.com/azaleta) in
[vitest-dev/vitest#2163

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.3...v0.24.4)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzQuMTkuMCJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
andipaetzold pushed a commit to andipaetzold/react-firehooks that referenced this pull request Nov 25, 2022
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@vitest/coverage-c8](https://togithub.com/vitest-dev/vitest) |
[`0.24.3` ->
`0.25.3`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-c8/0.24.3/0.25.3)
|
[![age](https://badges.renovateapi.com/packages/npm/@vitest%2fcoverage-c8/0.25.3/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@vitest%2fcoverage-c8/0.25.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@vitest%2fcoverage-c8/0.25.3/compatibility-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@vitest%2fcoverage-c8/0.25.3/confidence-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|
| [vitest](https://togithub.com/vitest-dev/vitest) | [`0.24.3` ->
`0.25.3`](https://renovatebot.com/diffs/npm/vitest/0.24.3/0.25.3) |
[![age](https://badges.renovateapi.com/packages/npm/vitest/0.25.3/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/vitest/0.25.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/vitest/0.25.3/compatibility-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/vitest/0.25.3/confidence-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vitest-dev/vitest</summary>

###
[`v0.25.3`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.3)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.25.2...v0.25.3)

#####    🚀 Features

- Test.each support string template  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[vitest-dev/vitest#2337
[<samp>(f7897)</samp>](https://togithub.com/vitest-dev/vitest/commit/f7897765)

#####    🐞 Bug Fixes

- Junit consistently puts "skipped" inside "testcase"  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va)
[<samp>(f7b27)</samp>](https://togithub.com/vitest-dev/vitest/commit/f7b27af0)
- Detect tests in folders starting with `.`  -  by
[@&#8203;sidharthv96](https://togithub.com/sidharthv96) in
[vitest-dev/vitest#2344
and
[vitest-dev/vitest#2359
[<samp>(c3951)</samp>](https://togithub.com/vitest-dev/vitest/commit/c395177f)
- **cli**: Don't override config by setting cli options to undefined  - 
by [@&#8203;rmehner](https://togithub.com/rmehner) in
[vitest-dev/vitest#2330
[<samp>(6ce3e)</samp>](https://togithub.com/vitest-dev/vitest/commit/6ce3ed7f)
- **coverage**: Env-replacer to add filenames into sourcemaps  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#2338
[<samp>(a2e9d)</samp>](https://togithub.com/vitest-dev/vitest/commit/a2e9daf6)
- **mocker**: Clear automocked modules on unmock  -  by
[@&#8203;mcous](https://togithub.com/mcous) in
[vitest-dev/vitest#2353
[<samp>(60918)</samp>](https://togithub.com/vitest-dev/vitest/commit/609185bd)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.25.2...v0.25.3)

###
[`v0.25.2`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.2)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.25.1...v0.25.2)

#####    🐞 Bug Fixes

- Dates are equal, if both are invalid  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2326
- Don't ignore properties, when put on a default function in CJS context
 -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2325

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.25.1...v0.25.2)

###
[`v0.25.1`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.1)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1)

#####    🚀 Features

- Add `vi.setConfig` helper  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2293
- Allow hooks to be executed in a stack or list  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2294

#####    🐞 Bug Fixes

- Always rewrite defined jsdom keys  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2290
- Default reporter regression  -  by
[@&#8203;antfu](https://togithub.com/antfu) in
[vitest-dev/vitest#2292
- Don't fail `bench` when using options  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[vitest-dev/vitest#2295

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1)

###
[`v0.25.0`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.0)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0)

#####    ✅ Builtin TypeChecking

In v0.25.0, Vitest allows you to write tests for your types, using
`expectTypeOf` or `assertType` syntaxes. By default all tests inside
`*.test-d.ts` files are considered type tests. Run `vitest typecheck` to
run type tests.

```ts
// my.test-d.ts
import { assertType, expectTypeOf } from 'vitest'
import { mount } from './mount.js'

test('my types work properly', () => {
  expectTypeOf(mount).toBeFunction()
  expectTypeOf(mount).parameter(0).toMatchTypeOf<{ name: string }>()

  // @&#8203;ts-expect-error name is a string
  assertType(mount({ name: 42 }))
})
```

Learn more at [the
documentation](https://vitest.dev/guide/testing-types.html) and this
[RFC](https://togithub.com/vitest-dev/vitest/issues/1954)

#####    🚨 Breaking Changes

- Return context in `startVitest()`  -  by
[@&#8203;antfu](https://togithub.com/antfu) in
[vitest-dev/vitest#2072

#####    🚀 Features

- `onTestFailed` hook  -  by [@&#8203;antfu](https://togithub.com/antfu)
in
[vitest-dev/vitest#2210
- Display error frame if present (like Vite)  -  by
[@&#8203;haikyuu](https://togithub.com/haikyuu) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2257
- Benchmark table report  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[vitest-dev/vitest#2179
- Add typechecking functionality  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) and
[@&#8203;antfu](https://togithub.com/antfu) in
[vitest-dev/vitest#2107

#####    🐞 Bug Fixes

- Clear full screen only in watch mode  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va)
[<samp>(c3d89)</samp>](https://togithub.com/vitest-dev/vitest/commit/c3d89504)
- Don't serialize symbols and immutables  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2266
- Use --conditions instead of -C  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2267
- Show correct stack trace in errors and console  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) and
[@&#8203;antfu](https://togithub.com/antfu) in
[vitest-dev/vitest#2248
- Align `.each` behavior with jest  -  by
[@&#8203;bartoszgolebiowski](https://togithub.com/bartoszgolebiowski)
and [@&#8203;antfu](https://togithub.com/antfu) in
[vitest-dev/vitest#2064
- Remove undefined values in options  -  by
[@&#8203;g4rry420](https://togithub.com/g4rry420) and
[@&#8203;antfu](https://togithub.com/antfu) in
[vitest-dev/vitest#2281
- **coverage**: Istanbul provider to preserve implicit else  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#2275

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0)

###
[`v0.24.5`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.24.5)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.4...v0.24.5)

#####    🚀 Features

- **vite-node**: Trigger beforeFullReload / beforePrune / invalidate
hook  -  by [@&#8203;ycmjason](https://togithub.com/ycmjason) in
[vitest-dev/vitest#2079

#####    🐞 Bug Fixes

- Respect folders with dot at the start, when mocking  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2244
- Prevent using mocks in rpc  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2254
- Show actual unhandled errors, serialize DOMErrors  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2253
- Load deps reporter  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[vitest-dev/vitest#2249

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.4...v0.24.5)

###
[`v0.24.4`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.24.4)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.3...v0.24.4)

#####    🚀 Features

- **vite-node**: Don't exit on uncaughtException in watch mode  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[vitest-dev/vitest#2186

#####    🐞 Bug Fixes

- Add/Update `repository` properties in `package.json`  -  by
[@&#8203;silverwind](https://togithub.com/silverwind) in
[vitest-dev/vitest#2151
- Ignore benchmark.reporters in getSerializableConfig  -  by
[@&#8203;kainstar](https://togithub.com/kainstar) in
[vitest-dev/vitest#2164
- Improve config's default exclude  -  by
[@&#8203;haikyuu](https://togithub.com/haikyuu) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2188
- Always use node condition  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#1919
- Clear terminal output before running tests, show errors in correct
order  -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2228
- Improve compatibility with native Node CJS resolution  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2226
- Don't use resolved paths if they don't actually exist  -  by
[@&#8203;simon-abbott](https://togithub.com/simon-abbott) in
[vitest-dev/vitest#1868
-   **cli**:
- Set inputNamePattern to RegExp source instead of string  -  by
[@&#8203;rafedramzi](https://togithub.com/rafedramzi) in
[vitest-dev/vitest#2201
- Normalize argument path  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[vitest-dev/vitest#2180
-   **coverage**:
- Trim URL parameters from file paths in istanbul coverage  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[vitest-dev/vitest#2232
- Trim URL parameters from file paths in c8 coverage  -  by
[@&#8203;OrestHk](https://togithub.com/OrestHk) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[vitest-dev/vitest#2181
-   **reporter**:
- Load custom reporter using `executeFile`  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[vitest-dev/vitest#2184
-   **vitest**:
- Return detailed error when using toHaveReturnedWith  -  by
[@&#8203;azaleta](https://togithub.com/azaleta) in
[vitest-dev/vitest#2163

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.3...v0.24.4)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/andipaetzold/react-firehooks).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC45LjIiLCJ1cGRhdGVkSW5WZXIiOiIzNC4zMC4yIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

Coverage report not clear and inconsistent with vue
2 participants