mirror of
https://github.com/withastro/astro.git
synced 2025-02-24 22:46:02 -05:00
refactor: remove integrations from test for now
This commit is contained in:
parent
80154b4f8e
commit
8886b5cd39
4 changed files with 22 additions and 19 deletions
29
packages/db/test/fixtures/basics/astro.config.ts
vendored
29
packages/db/test/fixtures/basics/astro.config.ts
vendored
|
@ -1,6 +1,5 @@
|
|||
import db, { defineTable, column } from '@astrojs/db';
|
||||
import db, { defineTable, column, sql, NOW } from '@astrojs/db';
|
||||
import { defineConfig } from 'astro/config';
|
||||
import { themes } from './themes-integration';
|
||||
|
||||
const Author = defineTable({
|
||||
columns: {
|
||||
|
@ -8,11 +7,25 @@ const Author = defineTable({
|
|||
},
|
||||
});
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
integrations: [db(), themes()],
|
||||
db: {
|
||||
tables: { Author },
|
||||
unsafeDisableStudio: true,
|
||||
// TODO: add back integration test
|
||||
const Themes = defineTable({
|
||||
columns: {
|
||||
name: column.text(),
|
||||
added: column.date({
|
||||
default: sql`CURRENT_TIMESTAMP`,
|
||||
}),
|
||||
updated: column.date({
|
||||
default: NOW,
|
||||
}),
|
||||
isDark: column.boolean({ default: sql`TRUE` }),
|
||||
owner: column.text({ optional: true, default: sql`NULL` }),
|
||||
},
|
||||
});
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
integrations: [db()],
|
||||
db: {
|
||||
tables: { Author, Themes },
|
||||
},
|
||||
});
|
||||
|
|
11
packages/db/test/fixtures/basics/db/seed.prod.ts
vendored
11
packages/db/test/fixtures/basics/db/seed.prod.ts
vendored
|
@ -1,11 +0,0 @@
|
|||
import { db, Author } from 'astro:db';
|
||||
|
||||
await db
|
||||
.insert(Author)
|
||||
.values([
|
||||
{ name: 'Ben' },
|
||||
{ name: 'Nate' },
|
||||
{ name: 'Erika' },
|
||||
{ name: 'Bjorn' },
|
||||
{ name: 'Sarah' },
|
||||
]);
|
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
/// <reference path="../../.astro/db-types.d.ts" />
|
||||
import { Author, db, Themes } from 'astro:db';
|
||||
|
||||
const authors = await db.select().from(Author);
|
||||
|
|
Loading…
Add table
Reference in a new issue