Skip to content

Commit 2ea03d7

Browse files
Haiderclaude
andcommitted
test(dbt-tools): remove duplicate "Could not parse" test
The new test at dbt-cli.test.ts L199 ("preserves generic 'Could not parse' when dbt exited 0 but output unparseable") used the same mock implementation and asserted the same rejection string as the existing "Tier 3: throws with helpful message when all tiers fail" test at L145. The generic-error path is fully covered by Tier 3; any future change to that behaviour would have had to be kept in sync across two identical tests. Addresses cubic-dev-ai review feedback on #933 (P3). Tests: 23 pass / 0 fail in packages/dbt-tools/test/dbt-cli.test.ts. Refs #932 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 064b0dd commit 2ea03d7

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

packages/dbt-tools/test/dbt-cli.test.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,6 @@ describe("execDbtShow", () => {
196196
await expect(execDbtShow("SELECT 1")).rejects.not.toThrow(/Could not parse dbt show output/)
197197
})
198198

199-
test("preserves generic 'Could not parse' when dbt exited 0 but output unparseable", async () => {
200-
// Existing behavior — dbt didn't crash, we just couldn't decode its output.
201-
mockExecFile.mockImplementation((_cmd: string, _args: string[], _opts: any, cb: Function) => {
202-
cb(null, "some unparseable output", "")
203-
})
204-
205-
await expect(execDbtShow("SELECT 1")).rejects.toThrow("Could not parse dbt show output in any format")
206-
})
207-
208199
test("falls back to error message when stderr is empty", async () => {
209200
mockExecFile.mockImplementation((_cmd: string, _args: string[], _opts: any, cb: Function) => {
210201
const err: any = new Error("spawn ENOENT")

0 commit comments

Comments
 (0)