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:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user