Skip to content

Commit 27b0805

Browse files
committed
update test
1 parent 3a4ccc4 commit 27b0805

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"scripts": {
3-
"read_colon_in_name": "node -e 'try { fs.readFileSync(process.argv[1]) } catch {}' 'node:fs'"
3+
"read_colon_in_name": "node read_node_fs.js"
44
}
55
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
try {
2+
require('node:fs').readFileSync('node:fs');
3+
} catch {}

packages/cli/snap-tests/colon-in-name/snap.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
> vp run read_colon_in_name
2-
$ node -e 'try { fs.readFileSync(process.argv[1]) } catch {}' 'node:fs'
2+
$ node read_node_fs.js
33

44

55
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -11,12 +11,12 @@ Performance: 0% cache hit rate
1111

1212
Task Details:
1313
────────────────────────────────────────────────
14-
[1] read_colon_in_name: $ node -e 'try { fs.readFileSync(process.argv[1]) } catch {}' 'node:fs'
14+
[1] read_colon_in_name: $ node read_node_fs.js
1515
→ Cache miss: no previous cache entry found
1616
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1717

1818
> vp run read_colon_in_name
19-
$ node -e 'try { fs.readFileSync(process.argv[1]) } catch {}' 'node:fs' (✓ cache hit, replaying)
19+
$ node read_node_fs.js (✓ cache hit, replaying)
2020

2121

2222
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -28,6 +28,6 @@ Performance: 100% cache hit rate, <variable>ms saved in total
2828

2929
Task Details:
3030
────────────────────────────────────────────────
31-
[1] read_colon_in_name: $ node -e 'try { fs.readFileSync(process.argv[1]) } catch {}' 'node:fs'
31+
[1] read_colon_in_name: $ node read_node_fs.js
3232
→ Cache hit - output replayed - <variable>ms saved
3333
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

0 commit comments

Comments
 (0)