You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The collection "ramen" does not exist. Please ensure it is defined in your content config.
Why? It seems to be related to .astro/data-store.json.
Executing npm run dev once before npm test improves this problem. The reason is that npm run dev makes .astro/data-store.json file when DevServer is booted.
In the case of npm test on GitHub actions, the file .astro/data-store.json does not exist when the test running, so it seems that getEntry causes the error The collection "ramen" does not exist..
What's the expected result?
ramen content entry should be retrieved even if npm test is run as GitHub actions job.
npm run build task generated .astro directory, but data-store.json was not made. As a workaround, how can I generate data-store.json file without running npm run dev?
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
My util function uses
getEntry
internally.It works well in astro page.
However,
npm test
on GitHub Actions Job is failed.https://github.com/NewGyu/astro5-with-vitest/actions/runs/12513338337/job/34907813726#step:5:14
Why? It seems to be related to
.astro/data-store.json
.Executing
npm run dev
once beforenpm test
improves this problem. The reason is thatnpm run dev
makes.astro/data-store.json
file when DevServer is booted.In the case of
npm test
on GitHub actions, the file.astro/data-store.json
does not exist when the test running, so it seems thatgetEntry
causes the errorThe collection "ramen" does not exist.
.What's the expected result?
ramen
content entry should be retrieved even ifnpm test
is run as GitHub actions job.Link to Minimal Reproducible Example
https://stackblitz.com/~/github.com/NewGyu/astro5-with-vitest
Participation
The text was updated successfully, but these errors were encountered: