Skip to content

Commit de62f9f

Browse files
committed
test: verify cache miss after source file change in build monorepo
1 parent 5379180 commit de62f9f

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

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

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

10+
> echo '<html><body><script type="module">console.log("changed");</script></body></html>' > packages/app/index.html
11+
> vp run app#build 2>&1 | grep 'cache miss' # should miss cache after source change
12+
~/packages/app$ vp build ○ cache miss: 'packages/app/index.html' modified, executing
13+
1014
> vp run web#build # should build the web
1115
> ls packages/web/dist # should have the build output
1216
assets

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
},
88
"ls packages/app/dist # should have the build output",
99
"vp run app#build 2>&1 | grep 'cache hit' # should hit cache",
10+
"echo '<html><body><script type=\"module\">console.log(\"changed\");</script></body></html>' > packages/app/index.html",
11+
"vp run app#build 2>&1 | grep 'cache miss' # should miss cache after source change",
1012
{
1113
"command": "vp run web#build # should build the web",
1214
"ignoreOutput": true

0 commit comments

Comments
 (0)