Skip to content

Commit 4d5e05c

Browse files
committed
fix(tests): migrate build-probes spy to the phase-1 seam; rescue orphaned search-conformance files
- build-probes.test.ts publish suite: spy promoteDraftForPublish + runPublishSideEffects (the batch no longer calls publishMetaItem per item, ADR-0067 D2). objectql suite back to 904/904. - The #3037 packages/dogfood -> packages/qa/dogfood restructure merged concurrently with #3065 and did not carry its three just-added files; they were orphaned at the old path outside every workspace (silently not running in CI). git mv them to packages/qa/dogfood/test — all 5 dogfood suites green at the new home (21 tests).
1 parent f4b94c5 commit 4d5e05c

4 files changed

Lines changed: 7 additions & 1 deletion

File tree

packages/objectql/src/build-probes.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,13 @@ describe('publishPackageDrafts — probes ride the response (ADR-0038 L3)', () =
183183
get: async (_ref: any, opts: any) =>
184184
opts?.state === 'draft' ? { body: ITEMS['seed expense_sample'], hash: 'h' } : null,
185185
});
186-
vi.spyOn(protocol, 'publishMetaItem' as never).mockResolvedValue({ success: true, version: 'h', seq: 1 } as never);
186+
// ADR-0067 D2 — the batch promotes via the phase-1 seam; side effects are phase 2.
187+
vi.spyOn(protocol as any, 'promoteDraftForPublish').mockImplementation(async (req: any) => ({
188+
singularType: req.type,
189+
orgId: null,
190+
result: { version: 'h', seq: 1, item: { body: ITEMS[`${req.type} ${req.name}`] ?? { name: req.name } }, packageId: null },
191+
}));
192+
vi.spyOn(protocol as any, 'runPublishSideEffects').mockResolvedValue({});
187193
vi.spyOn(protocol as any, 'applySeedBodies').mockResolvedValue({ success: false, inserted: 0, updated: 0, error: 'boom' });
188194
// Probe reads: active items + an engine whose table stayed empty.
189195
(protocol as any).getMetaItem = async ({ type, name }: any) => ({ item: ITEMS[`${type} ${name}`] });
File renamed without changes.
File renamed without changes.

packages/dogfood/test/showcase-search.dogfood.test.ts renamed to packages/qa/dogfood/test/showcase-search.dogfood.test.ts

File renamed without changes.

0 commit comments

Comments
 (0)