Skip to content

Commit f42cd4d

Browse files
committed
test(snap): reproduce build failure on NTFS junction paths
Windows-only snap test that builds a project reached through an NTFS junction prefix. Pre-populated snap.txt expects the post-fix success output, so CI surfaces the bug as a snap diff until it's fixed. Refs #1374
1 parent 787f427 commit f42cd4d

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!doctype html>
2+
<html>
3+
<body>
4+
<script type="module">
5+
console.log('hello from junction');
6+
</script>
7+
</body>
8+
</html>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "ntfs-junction-app",
3+
"private": true
4+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const fs = require('node:fs');
2+
const path = require('node:path');
3+
4+
// Reproduce issue #1374: build fails when project root is reached through an NTFS junction.
5+
// Layout after setup:
6+
// ./real/app <- the actual project (real path)
7+
// ./via <- NTFS junction pointing to ./real
8+
// ./via/app <- the project reached through the junction
9+
fs.symlinkSync(path.resolve('real'), path.resolve('via'), 'junction');
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
> cd via/app && vp build 2>&1 | grep -E 'built in|vite:build-html'
2+
✓ built in <variable>ms
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"ignoredPlatforms": ["darwin", "linux"],
3+
"commands": [
4+
{ "command": "node setup.js", "ignoreOutput": true },
5+
"cd via/app && vp build 2>&1 | grep -E 'built in|vite:build-html'"
6+
]
7+
}

0 commit comments

Comments
 (0)