Skip to content

Fix discovery of tests under Windows#5273

Closed
cdprete wants to merge 1 commit intocodecentric:masterfrom
cdprete:master
Closed

Fix discovery of tests under Windows#5273
cdprete wants to merge 1 commit intocodecentric:masterfrom
cdprete:master

Conversation

@cdprete
Copy link
Copy Markdown
Contributor

@cdprete cdprete commented Apr 17, 2026

Fixes the error reported in #5241 (comment)

Please be aware that some tests fail on Windows due to mismatches like

-   data-v-4727d85f=""
+   data-v-ee5aaf5b=""

(I've no clue what's that about)

and others fail due to localization issues

FAIL  utils/formatWithDataTypes.spec.ts > formatWithDataTypes > formats date from ISO string
AssertionError: expected 'Jun 1, 2024, 2:34:56 PM' to match /01\.06\.2024, 14:34:56/

- Expected:
/01\.06\.2024, 14:34:56/

+ Received:
"Jun 1, 2024, 2:34:56 PM"

@cdprete cdprete requested a review from a team as a code owner April 17, 2026 14:41
@cdprete
Copy link
Copy Markdown
Contributor Author

cdprete commented Apr 17, 2026

Well, it seems like that hashes are created due to scoped styles (perfectly valid) and @reference (e.g.: @reference "../../../index.css";) is somehow breaking this because the paths somehow mismatch (i.e.: they don't use the @ alias as starting point).
I personally find those tests a bit fragile since the snapshots need to recomputed anything changes, but so be it. :)
Maybe the tests would be more stable/robust if a snapshot serialized would be added to drop the data-v-XYZ properties while doing the matching, but I can't of course decide this on my own.

Since I've no clue how to fix this in an absolutely safe way, I'll close this PR.

@SteKoe the main issue with the tests discovery on Windows is that in the includes an absolute path is provided.
Maybe you've an idea on how to adapt the config so that relative ones can be used instead.

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.

1 participant