Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
test(search): drop a dialect test that only read its own fixture
Yudhi Armyndharisc48803b2f0c6
diff --git a/src/modules/search/providers/search-dual-db.spec.ts b/src/modules/search/providers/search-dual-db.spec.tsindex f680c0c86..393a5b9c0 100644--- a/src/modules/search/providers/search-dual-db.spec.ts+++ b/src/modules/search/providers/search-dual-db.spec.ts@@ -14,7 +14,7 @@ import { BuiltInFtsProvider } from './builtin-fts.provider';** Also covers the FTS-absent safety net: if the FTS schema is missing (e.g. non-FTS5 SQLite build* where the migration skipped, or a partial state), the provider 501s cleanly instead of crashing on- * a missing table — and the dialect branch reads `dataSource.options.type`.+ * a missing table.*/async function boot(): Promise<{ ds: DataSource; provider: BuiltInFtsProvider }> {const ds = new DataSource({@@ -76,13 +76,4 @@ describe('search dual-DB + import/export round-trip safety (sqlite)', () => {await expect(provider.search({ q: 'x' })).rejects.toThrow(/no full-text index/i);await ds.destroy();});-- it('uses the SQLite query path on a sqlite DataSource (dialect branch decision)', async () => {- // Smoke: the provider reads dataSource.options.type and branches. The SQLite branch is exercised- // end-to-end above (and in builtin-fts.provider.spec.ts); the PG branch lives in the PG-gated- // spec. This pins the branch decision so a future refactor can't silently drop the dialect read.- const sqlite = await boot();- expect((sqlite.provider as unknown as { dataSource: DataSource }).dataSource.options.type).toBe('better-sqlite3');- await sqlite.ds.destroy();- });});