Commit 20f9d69
authored
fix(react/testing-library): generate same snapshot for Windows (#1011)
## Summary
<!-- Can you explain the reasoning behind implementing this change? What
problem or issue does this pull request resolve? -->
Similar to #1007, we normalize the relative path to ensure consistent
snapshot generation across Windows, Linux, and macOS.
> [!NOTE]
> The testing library does not work on Windows now since we are using
`environment` with a absolute path.
> An error "Cannot find dependency
'vitest-environment-C:\Users\Admin\colin\lynx-stack\packages\react\testing-library\dist\env\vitest.js'"
would occur.
>
> I've submitted a fix at vitest-dev/vitest#8105
<!-- It would be helpful if you could provide any relevant context, such
as GitHub issues or related discussions. -->
issue: #81
## Checklist
<!--- Check and mark with an "x" -->
- [ ] Tests updated (or not required).
- [ ] Documentation updated (or not required).1 parent 97e45e3 commit 20f9d69
File tree
2 files changed
+9
-2
lines changed- .changeset
- packages/react/testing-library/src
2 files changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
0 commit comments