-
Describe the bugI'm not sure it's a direct error or problem of vitest, but to get some help or cues, I report this. In git action, it fails with the comment as As shown in the reproduction image, after combineOrders.test.tsx is passed, and it is stuck in the next test spending the whole test time ending up with test fail. After testing this, I found that this error occurs in case that test tries to find a element by synchronous method such as getByText, getBy-. In local environment, it occurs error as intended if not found. Are there anybody who experienced this case ? Thank you all ! ReproductionSystem InfoSystem:
OS: macOS 14.4.1
CPU: (11) arm64 Apple M3 Pro
Memory: 1.05 GB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.3.0 - /opt/homebrew/bin/node
Yarn: 1.22.17 - /opt/homebrew/bin/yarn
npm: 9.6.7 - /opt/homebrew/bin/npm
pnpm: 8.6.9 - /opt/homebrew/bin/pnpm
Watchman: 2023.06.12.00 - /opt/homebrew/bin/watchman
Browsers:
Chrome: 123.0.6312.107
Safari: 17.4.1
npmPackages:
@vitejs/plugin-basic-ssl: 1.1.0 => 1.1.0
@vitejs/plugin-react-swc: 3.6.0 => 3.6.0
vite: 5.1.1 => 5.1.1
vitest: 1.4.0 => 1.4.0 Used Package Managerpnpm Validations
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
I suppose you're talking about some sort of testing library. Can you provide links where these API are coming from? |
Beta Was this translation helpful? Give feedback.
Thanks for the links.
I don't know your specific test setup, but I think your question should be asked to testing-library team. The reason why synchronous version makes CI stuck is not something we can answer or investigate from the information provided so far (meaning we need a reproduction).
Probably asynchronous version is simply more robust (with automatic timeout), so I suppose it's better to go with that.