diff --git a/packages/db/test/fixtures/basics/astro.config.mjs b/packages/db/test/fixtures/basics/astro.config.mjs deleted file mode 100644 index 7f325b22b0..0000000000 --- a/packages/db/test/fixtures/basics/astro.config.mjs +++ /dev/null @@ -1,16 +0,0 @@ -import { defineConfig } from 'astro/config'; -import db, { field } from '@astrojs/db'; - -// https://astro.build/config -export default defineConfig({ - integrations: [db()], - db: { - collections: { - Author: { - fields: { - name: field.text(), - }, - } - } - } -}); diff --git a/packages/db/test/fixtures/basics/astro.config.ts b/packages/db/test/fixtures/basics/astro.config.ts new file mode 100644 index 0000000000..d364fd6f90 --- /dev/null +++ b/packages/db/test/fixtures/basics/astro.config.ts @@ -0,0 +1,36 @@ +import { defineConfig } from 'astro/config'; +import db, { defineCollection, field } from '@astrojs/db'; + +const Author = defineCollection({ + fields: { + name: field.text(), + }, + data() { + return [ + { + name: 'Ben', + }, + { + name: 'Nate', + }, + { + name: 'Erika', + }, + { + name: 'Bjorn', + }, + { + name: 'Sarah', + }, + ] + } +}) + +// https://astro.build/config +export default defineConfig({ + integrations: [db()], + db: { + collections: { Author } + } +}); +