mirror of
https://github.com/withastro/astro.git
synced 2025-03-17 23:11:29 -05:00
Seed the Themes in build too
This commit is contained in:
parent
ff3816acc8
commit
30783e975f
1 changed files with 6 additions and 7 deletions
13
packages/db/test/fixtures/basics/astro.config.ts
vendored
13
packages/db/test/fixtures/basics/astro.config.ts
vendored
|
@ -27,7 +27,7 @@ export default defineConfig({
|
|||
db: {
|
||||
studio: true,
|
||||
collections: { Author, Themes },
|
||||
async data({ seed, mode }) {
|
||||
async data({ seed }) {
|
||||
await seed(Author, [
|
||||
{ name: 'Ben' },
|
||||
{ name: 'Nate' },
|
||||
|
@ -36,12 +36,11 @@ export default defineConfig({
|
|||
{ name: 'Sarah' },
|
||||
]);
|
||||
// Seed writable collections in dev mode, only
|
||||
if (mode === 'dev') {
|
||||
await seed(Themes, [
|
||||
{ name: 'dracula' },
|
||||
{ name: 'monokai' },
|
||||
]);
|
||||
}
|
||||
// but in this case we do it for both, due to tests
|
||||
await seed(Themes, [
|
||||
{ name: 'dracula' },
|
||||
{ name: 'monokai' },
|
||||
]);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue