import { expect, test } from 'bun:test' import path from 'path' import runMigrationSqlite from './../src/migration.ts' import getOrCreateSqlite from './../src/sqlite.ts' import { Database } from 'bun:sqlite' test('migration', async () => { const db = getOrCreateSqlite({ 'uri': ':memory:', 'create': true, 'readwrite': true }) await runMigrationSqlite(path.join(__dirname, './../resources'), db) // check for boxes const results = db.query("SELECT name FROM sqlite_master WHERE type='table' AND name='items'").get() expect(results).toEqual({ name: 'items' }) })