did more of the knex -> sqlite migration.
This commit is contained in:
@ -3,9 +3,10 @@ import { render, screen, fireEvent, act } from "@testing-library/react-native";
|
||||
import SettingsComponent from "@/components/Settings";
|
||||
import { language_matrix } from "@/app/i18n/api";
|
||||
import { Settings } from "@/app/lib/settings";
|
||||
import { getDb } from "@/app/lib/db";
|
||||
import { getDb, migrateDb } from "@/app/lib/db";
|
||||
import { Knex } from "knex";
|
||||
import { WhisperFile } from "@/app/lib/whisper";
|
||||
import { SQLiteDatabase } from "expo-sqlite";
|
||||
|
||||
const RENDER_TIME = 1000;
|
||||
|
||||
@ -77,7 +78,7 @@ jest.mock("@/app/i18n/api", () => {
|
||||
|
||||
|
||||
describe("SettingsComponent", () => {
|
||||
let db: Knex;
|
||||
let db: SQLiteDatabase;
|
||||
let settings: Settings;
|
||||
|
||||
beforeEach(async () => {
|
||||
@ -90,8 +91,7 @@ describe("SettingsComponent", () => {
|
||||
|
||||
afterEach(async () => {
|
||||
jest.restoreAllMocks();
|
||||
await db.migrate.down();
|
||||
await db.destroy();
|
||||
await migrateDb("development", "down");
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
|
Reference in New Issue
Block a user