mirror of
https://github.com/withastro/astro.git
synced 2025-03-10 23:01:26 -05:00
chore: move basics to new data set
This commit is contained in:
parent
1c25081767
commit
34c7639149
1 changed files with 19 additions and 20 deletions
39
packages/db/test/fixtures/basics/astro.config.ts
vendored
39
packages/db/test/fixtures/basics/astro.config.ts
vendored
|
@ -5,25 +5,6 @@ const Author = defineCollection({
|
|||
fields: {
|
||||
name: field.text(),
|
||||
},
|
||||
data() {
|
||||
return [
|
||||
{
|
||||
name: 'Ben',
|
||||
},
|
||||
{
|
||||
name: 'Nate',
|
||||
},
|
||||
{
|
||||
name: 'Erika',
|
||||
},
|
||||
{
|
||||
name: 'Bjorn',
|
||||
},
|
||||
{
|
||||
name: 'Sarah',
|
||||
},
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
const Themes = defineWritableCollection({
|
||||
|
@ -37,6 +18,24 @@ export default defineConfig({
|
|||
integrations: [db()],
|
||||
db: {
|
||||
collections: { Author, Themes },
|
||||
data({ set }) {
|
||||
set(Author, [
|
||||
{
|
||||
name: 'Ben',
|
||||
},
|
||||
{
|
||||
name: 'Nate',
|
||||
},
|
||||
{
|
||||
name: 'Erika',
|
||||
},
|
||||
{
|
||||
name: 'Bjorn',
|
||||
},
|
||||
{
|
||||
name: 'Sarah',
|
||||
},
|
||||
]);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue