From 0ad036e88bbd7f98ed664c0d55fb89ee9d6a0f8a Mon Sep 17 00:00:00 2001 From: Fei Xu Date: Sat, 24 Oct 2026 05:06:15 +0000 Subject: [PATCH] test(mdcode): expect the translated metric as a BIGQUERY dialect entry in the two-phase transpile test --transpile now writes its translation as a BIGQUERY dialect entry, while the two-phase deploy test still checked the metric's expression. The two changes passed separately, so main failed this test. The check now expects a BIGQUERY entry in the metric's dialects. --- toolbox/mdcode/tests/tool/two_phase/deploy.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolbox/mdcode/tests/tool/two_phase/deploy.test.ts b/toolbox/mdcode/tests/tool/two_phase/deploy.test.ts index 267fe2d7..689c11a5 100644 --- a/toolbox/mdcode/tests/tool/two_phase/deploy.test.ts +++ b/toolbox/mdcode/tests/tool/two_phase/deploy.test.ts @@ -404,7 +404,8 @@ scenarios('how push deploys each deployment in order, and what it prints', [ check: r => { for (const models of [...r.fake.bq.mock.calls.map(c => c[0]), r.fake.preflight.mock.calls[0][0]]) { - expect(models[0].model.metrics?.[0]?.expression).toBeDefined(); + expect(models[0].model.metrics![0].dialects) + .toContainEqual(expect.objectContaining({dialect: 'BIGQUERY'})); } }, },