test(server): build cron, trace and held-action stores on WaggleDB (P1.5)

These stores take Waggle's own database since ADR-0007; the tests still
handed them a MindDB. Only the store construction changes.
This commit is contained in:
shumeiko.it
2026-10-24 12:37:43 +02:00
parent 424b46db19
commit 88fbc0a9e7
8 changed files with 30 additions and 30 deletions

View File

@@ -2,12 +2,12 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
import { CronStore, MindDB } from '@waggle/core';
import { CronStore, WaggleDB } from '@waggle/core';
import { resolveApprovalTimeoutPolicy, waitForApprovalDecision } from '../../src/local/routes/chat.js';
describe('chat approval timeout policy', () => {
let tmpDir: string;
let db: MindDB;
let db: WaggleDB;
let cronStore: CronStore;
let pendingApprovals: Map<string, {
resolve: (approved: boolean) => void;
@@ -20,7 +20,7 @@ describe('chat approval timeout policy', () => {
vi.useFakeTimers();
vi.setSystemTime(new Date('2026-07-15T10:00:00.000Z'));
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'waggle-approval-timeout-'));
db = new MindDB(path.join(tmpDir, 'test.mind'));
db = new WaggleDB(path.join(tmpDir, 'waggle.db'));
cronStore = new CronStore(db);
pendingApprovals = new Map();
});