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:
@@ -3,7 +3,7 @@ import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import * as os from 'node:os';
|
||||
import type { FastifyInstance } from 'fastify';
|
||||
import { MindDB, CronStore, type SavePendingActionInput } from '@waggle/core';
|
||||
import { WaggleDB, CronStore, type SavePendingActionInput } from '@waggle/core';
|
||||
import { enqueueHeldAction, executeHeldAction, isProposableTool, decideReviewTurnTool } from '../../src/local/held-action-executor.js';
|
||||
|
||||
function makeServer(
|
||||
@@ -22,12 +22,12 @@ function makeServer(
|
||||
|
||||
describe('held-action-executor', () => {
|
||||
let tmpDir: string;
|
||||
let db: MindDB;
|
||||
let db: WaggleDB;
|
||||
let store: CronStore;
|
||||
|
||||
beforeEach(() => {
|
||||
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'waggle-held-'));
|
||||
db = new MindDB(path.join(tmpDir, 'test.mind'));
|
||||
db = new WaggleDB(path.join(tmpDir, 'waggle.db'));
|
||||
store = new CronStore(db);
|
||||
});
|
||||
afterEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user