Add resumable admin deep search
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
import { test, expect } from 'bun:test';
|
||||
import * as sc from './search-cache.js';
|
||||
import { initDb } from './db.js';
|
||||
|
||||
import { test, expect, afterAll } from 'bun:test';
|
||||
import { mkdtempSync, rmSync } from 'node:fs';
|
||||
import { tmpdir } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
const root = mkdtempSync(join(tmpdir(), 'ytp-search-cache-'));
|
||||
process.env.DB_PATH = join(root, 'test.db');
|
||||
const sc = await import('./search-cache.js');
|
||||
const { initDb } = await import('./db.js');
|
||||
await initDb();
|
||||
afterAll(() => rmSync(root, { recursive: true, force: true }));
|
||||
const cards = (n) => Array.from({ length: n }, (_, i) => ({ id: 'v' + i, title: 't' + i }));
|
||||
|
||||
test('put/get round-trips, case-insensitive, capped at 200', async () => {
|
||||
|
||||
Reference in New Issue
Block a user