vitest icon indicating copy to clipboard operation
vitest copied to clipboard

perf(utils): optimize parse stack trace regexp

Open userquin opened this issue 1 year ago • 3 comments

Description

closes #6039

Check https://github.com/userquin/vitest-stacktrace-issue-6039

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:.

userquin avatar Jul 14 '24 14:07 userquin

We should add test case from #6039 that timeouts without this fix.

Added a test in the test/browser folder: rn we cannot test the timeout since we need to add PW/WDIO test, and we have only PW/WDIO tests using happy-dom to test the ui.

If you want to test it, change test:browser:* scripts in test/browser/vite.config.mts and run them:

    "test:browser:preview": "BROWSER=firefox PROVIDER=preview vitest",
    "test:browser:playwright": "BROWSER=firefox PROVIDER=playwright vitest",
    "test:browser:webdriverio": "BROWSER=firefox PROVIDER=webdriverio vitest"

For example, running preview provider: imagen

(check test/ui/test folder)

userquin avatar Jul 15 '24 20:07 userquin

Seems like the current implementation breaks inline snapshots in the browser

sheremet-va avatar Jul 16 '24 07:07 sheremet-va

Seems like the current implementation breaks inline snapshots in the browser

By "current", I mean this PR. It works fine in main.

sheremet-va avatar Jul 22 '24 11:07 sheremet-va

@userquin any luck fixing this issue? 🙏 🙏 🙏

jrmdayn avatar Sep 06 '24 11:09 jrmdayn

https://github.com/vitest-dev/vitest/pull/8531

AriPerkkio avatar Sep 08 '25 12:09 AriPerkkio