Skip to content

Conversation

@hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Feb 4, 2025

Description

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@netlify
Copy link

netlify bot commented Feb 4, 2025

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c6e5322
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/67a1a240fbfd02000836b9a0
😎 Deploy Preview https://deploy-preview-7414--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Comment on lines 5 to 23
test("test-a", (ctx) => {
expect(ctx.__suiteNames).toEqual([]);
})

describe("suite-x", () => {
test("test-b", (ctx) => {
expect(ctx.__suiteNames).toEqual(
['suite-x']
)
})

describe("suite-y", () => {
test("test-c", (ctx) => {
expect(ctx.__suiteNames).toEqual(
['suite-y', 'suite-x']
)
})
})
})
Copy link
Contributor Author

@hi-ogawa hi-ogawa Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On #7374, some tests fail (and pass) in an odd way:

Details
 DEV  v3.0.7 /home/hiroshi/code/others/vitest/test/cli/fixtures/custom-runner

 ❯ custom-runner.test.ts (3 tests | 2 failed) 6ms
   × test-a 5ms
     → expected [ '' ] to deeply equal []
   ✓ suite-x > test-b
   × suite-x > suite-y > test-c 1ms
     → expected [ 'suite-y' ] to deeply equal [ 'suite-y', 'suite-x' ]

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Tests 2 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

 FAIL  custom-runner.test.ts > test-a
AssertionError: expected [ '' ] to deeply equal []

- Expected
+ Received

- []
+ [
+   "",
+ ]

 ❯ custom-runner.test.ts:6:27
      4| 
      5| test("test-a", (ctx) => {
      6|  expect(ctx.__suiteNames).toEqual([]);
       |                           ^
      7| })
      8| 

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/2]⎯

 FAIL  custom-runner.test.ts > suite-x > suite-y > test-c
AssertionError: expected [ 'suite-y' ] to deeply equal [ 'suite-y', 'suite-x' ]

- Expected
+ Received

  [
    "suite-y",
-   "suite-x",
  ]

 ❯ custom-runner.test.ts:18:29
     16|  describe("suite-y", () => {
     17|   test("test-c", (ctx) => {
     18|    expect(ctx.__suiteNames).toEqual(
       |                             ^
     19|     ['suite-y', 'suite-x']
     20|    )

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/2]⎯


 Test Files  1 failed (1)
      Tests  2 failed | 1 passed (3)
   Start at  14:56:29
   Duration  147ms (transform 25ms, setup 0ms, collect 8ms, tests 6ms, environment 0ms, prepare 53ms)

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 3, 2025

@vitest/browser

npm i https://pkg.pr.new/@vitest/browser@7414

@vitest/coverage-istanbul

npm i https://pkg.pr.new/@vitest/coverage-istanbul@7414

@vitest/coverage-v8

npm i https://pkg.pr.new/@vitest/coverage-v8@7414

@vitest/expect

npm i https://pkg.pr.new/@vitest/expect@7414

@vitest/mocker

npm i https://pkg.pr.new/@vitest/mocker@7414

@vitest/pretty-format

npm i https://pkg.pr.new/@vitest/pretty-format@7414

@vitest/runner

npm i https://pkg.pr.new/@vitest/runner@7414

@vitest/snapshot

npm i https://pkg.pr.new/@vitest/snapshot@7414

@vitest/spy

npm i https://pkg.pr.new/@vitest/spy@7414

@vitest/ui

npm i https://pkg.pr.new/@vitest/ui@7414

@vitest/utils

npm i https://pkg.pr.new/@vitest/utils@7414

vite-node

npm i https://pkg.pr.new/vite-node@7414

vitest

npm i https://pkg.pr.new/vitest@7414

@vitest/web-worker

npm i https://pkg.pr.new/@vitest/web-worker@7414

@vitest/ws-client

npm i https://pkg.pr.new/@vitest/ws-client@7414

commit: 3461652

@hi-ogawa hi-ogawa marked this pull request as ready for review March 3, 2025 06:04
@hi-ogawa hi-ogawa requested a review from sheremet-va March 3, 2025 06:10
@sheremet-va sheremet-va merged commit ca9ffac into vitest-dev:main Mar 6, 2025
14 checks passed
@hi-ogawa hi-ogawa deleted the fix-early-task-suite branch March 6, 2025 23:10
jelmore1674 pushed a commit to jelmore1674/build-changelog that referenced this pull request Mar 19, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/main/packages/coverage-v8#readme) ([source](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8)) | devDependencies | patch | [`3.0.7` -> `3.0.8`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-v8/3.0.7/3.0.8) |
| [vitest](https://github.com/vitest-dev/vitest) ([source](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | devDependencies | patch | [`3.0.7` -> `3.0.8`](https://renovatebot.com/diffs/npm/vitest/3.0.7/3.0.8) |

---

### Release Notes

<details>
<summary>vitest-dev/vitest (@&#8203;vitest/coverage-v8)</summary>

### [`v3.0.8`](https://github.com/vitest-dev/vitest/releases/tag/v3.0.8)

[Compare Source](vitest-dev/vitest@v3.0.7...v3.0.8)

#####    🐞 Bug Fixes

-   Fix fetch cache multiple writes  -  by [@&#8203;hi-ogawa](https://github.com/hi-ogawa) in vitest-dev/vitest#7546 [<samp>(1a8b4)</samp>](vitest-dev/vitest@1a8b4337)
-   Use browser.isolate instead of config.isolate  -  by [@&#8203;sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#7560 [<samp>(4b5ed)</samp>](vitest-dev/vitest@4b5ed902)
-   Remove vestigial spy stub, import directly from `@vitest/spy`  -  by [@&#8203;mrginglymus](https://github.com/mrginglymus) in vitest-dev/vitest#7575 [<samp>(7f7ff)</samp>](vitest-dev/vitest@7f7ff11c)
-   Correctly split the argv string  -  by [@&#8203;btea](https://github.com/btea) in vitest-dev/vitest#7533 [<samp>(4325a)</samp>](vitest-dev/vitest@4325ac67)
-   **browser**:
    -   Remove [@&#8203;testing-library/dom](https://github.com/testing-library/dom) from dependencies  -  by [@&#8203;sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#7555 [<samp>(5387a)</samp>](vitest-dev/vitest@5387a5b3)
    -   Improve source map handling for bundled files  -  by [@&#8203;sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#7534 [<samp>(e2c57)</samp>](vitest-dev/vitest@e2c570b6)
    -   Print related test file and potential test in unhandled errors  -  by [@&#8203;sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#7564 [<samp>(fee90)</samp>](vitest-dev/vitest@fee90d85)
-   **runner**:
    -   Fix `beforeEach/All` cleanup callback timeout  -  by [@&#8203;hi-ogawa](https://github.com/hi-ogawa) in vitest-dev/vitest#7500 [<samp>(0c292)</samp>](vitest-dev/vitest@0c2924b7)
    -   Fix and simplify `Task.suite` initialization  -  by [@&#8203;hi-ogawa](https://github.com/hi-ogawa) in vitest-dev/vitest#7414 [<samp>(ca9ff)</samp>](vitest-dev/vitest@ca9ffac5)
-   **snapshot**:
    -   Allow inline snapshot calls on same location with same snapshot  -  by [@&#8203;jycouet](https://github.com/jycouet) and [@&#8203;hi-ogawa](https://github.com/hi-ogawa) in vitest-dev/vitest#7464 [<samp>(d5cb8)</samp>](vitest-dev/vitest@d5cb8212)
-   **vite-node**:
    -   Fix `buildStart` on Vite 6  -  by [@&#8203;hi-ogawa](https://github.com/hi-ogawa) in vitest-dev/vitest#7480 [<samp>(c0f47)</samp>](vitest-dev/vitest@c0f47e03)

#####     [View changes on GitHub](vitest-dev/vitest@v3.0.7...v3.0.8)

</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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODguNCIsInVwZGF0ZWRJblZlciI6IjM5LjE4OC40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://gitea.justinelmore.dev/jelmore1674/build-changelog/pulls/95
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants