Skip to content

Commit b844419

Browse files
committed
test: verify vp run build hits cache in package sub dir
1 parent ec45755 commit b844419

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ index.cjs
66
~/packages/hello$ vp pack ◉ cache hit, replaying
77
vp run: cache hit, <variable>ms saved.
88

9+
> cd packages/hello && vp run build 2>&1 | grep 'cache hit' # should hit cache in sub dir
10+
~/packages/hello$ vp pack ◉ cache hit, replaying
11+
vp run: cache hit, <variable>ms saved.
12+
913
> echo 'export function hello() { console.log("changed"); }' > packages/hello/src/hello.ts
1014
> vp run hello#build 2>&1 | grep 'cache miss' # should miss cache after source change
1115
~/packages/hello$ vp pack ○ cache miss: 'packages/hello/src/hello.ts' modified, executing

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
},
77
"ls packages/hello/dist # should have the library",
88
"vp run hello#build 2>&1 | grep 'cache hit' # should hit cache",
9+
"cd packages/hello && vp run build 2>&1 | grep 'cache hit' # should hit cache in sub dir",
910
"echo 'export function hello() { console.log(\"changed\"); }' > packages/hello/src/hello.ts",
1011
"vp run hello#build 2>&1 | grep 'cache miss' # should miss cache after source change",
1112
{

0 commit comments

Comments
 (0)