Skip to content

Commit ec45755

Browse files
committed
test: restore ls steps in cache snap tests
1 parent acb6c8e commit ec45755

4 files changed

Lines changed: 23 additions & 0 deletions

File tree

packages/cli/snap-tests/command-pack-monorepo/snap.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
> vp run hello#build # should build the library
2+
> ls packages/hello/dist # should have the library
3+
index.cjs
4+
25
> vp run hello#build 2>&1 | grep 'cache hit' # should hit cache
36
~/packages/hello$ vp pack ◉ cache hit, replaying
47
vp run: cache hit, <variable>ms saved.
@@ -8,11 +11,18 @@ vp run: cache hit, <variable>ms saved.
811
~/packages/hello$ vp pack ○ cache miss: 'packages/hello/src/hello.ts' modified, executing
912

1013
> vp run array-config#build # should build the library supports array config
14+
> ls packages/array-config/dist # should have the library
15+
index.d.mts
16+
index.mjs
17+
1118
> vp run array-config#build 2>&1 | grep 'cache hit' # should hit cache
1219
~/packages/array-config$ vp pack ◉ cache hit, replaying
1320
vp run: cache hit, <variable>ms saved.
1421

1522
> vp run default-config#build # should build the library supports default config
23+
> ls packages/default-config/dist # should have the library
24+
index.mjs
25+
1626
> vp run default-config#build 2>&1 | grep 'cache hit' # should hit cache
1727
~/packages/default-config$ vp pack ◉ cache hit, replaying
1828
vp run: cache hit, <variable>ms saved.

packages/cli/snap-tests/command-pack-monorepo/steps.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@
44
"command": "vp run hello#build # should build the library",
55
"ignoreOutput": true
66
},
7+
"ls packages/hello/dist # should have the library",
78
"vp run hello#build 2>&1 | grep 'cache hit' # should hit cache",
89
"echo 'export function hello() { console.log(\"changed\"); }' > packages/hello/src/hello.ts",
910
"vp run hello#build 2>&1 | grep 'cache miss' # should miss cache after source change",
1011
{
1112
"command": "vp run array-config#build # should build the library supports array config",
1213
"ignoreOutput": true
1314
},
15+
"ls packages/array-config/dist # should have the library",
1416
"vp run array-config#build 2>&1 | grep 'cache hit' # should hit cache",
1517
{
1618
"command": "vp run default-config#build # should build the library supports default config",
1719
"ignoreOutput": true
1820
},
21+
"ls packages/default-config/dist # should have the library",
1922
"vp run default-config#build 2>&1 | grep 'cache hit' # should hit cache"
2023
]
2124
}

packages/cli/snap-tests/vp-build-cache-monorepo/snap.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
> vp run app#build # should build the app
2+
> ls packages/app/dist # should have the build output
3+
assets
4+
index.html
5+
26
> vp run app#build 2>&1 | grep 'cache hit' # should hit cache
37
~/packages/app$ vp build ◉ cache hit, replaying
48
vp run: cache hit, <variable>ms saved.
@@ -8,6 +12,10 @@ vp run: cache hit, <variable>ms saved.
812
~/packages/app$ vp build ○ cache miss: 'packages/app/index.html' modified, executing
913

1014
> vp run web#build # should build the web
15+
> ls packages/web/dist # should have the build output
16+
assets
17+
index.html
18+
1119
> vp run web#build 2>&1 | grep 'cache hit' # should hit cache
1220
~/packages/web$ vp build ◉ cache hit, replaying
1321
vp run: cache hit, <variable>ms saved.

packages/cli/snap-tests/vp-build-cache-monorepo/steps.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
"command": "vp run app#build # should build the app",
55
"ignoreOutput": true
66
},
7+
"ls packages/app/dist # should have the build output",
78
"vp run app#build 2>&1 | grep 'cache hit' # should hit cache",
89
"echo '<html><body><script type=\"module\">console.log(\"changed\");</script></body></html>' > packages/app/index.html",
910
"vp run app#build 2>&1 | grep 'cache miss' # should miss cache after source change",
1011
{
1112
"command": "vp run web#build # should build the web",
1213
"ignoreOutput": true
1314
},
15+
"ls packages/web/dist # should have the build output",
1416
"vp run web#build 2>&1 | grep 'cache hit' # should hit cache"
1517
]
1618
}

0 commit comments

Comments
 (0)