From 6ed139e3b61dc8ecad9069951ebb27d2193b4e99 Mon Sep 17 00:00:00 2001 From: Cleve Stuart Date: Fri, 13 Dec 2024 17:33:09 -0500 Subject: [PATCH] Failure mode tests --- test/local.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/local.mjs b/test/local.mjs index 60f8539a..b220dbb8 100644 --- a/test/local.mjs +++ b/test/local.mjs @@ -1,12 +1,12 @@ //@ts-check import { expect } from "chai"; +import { AbortError } from "fauna"; import sinon, { stub } from "sinon"; import { run } from "../src/cli.mjs"; import { setupTestContainer } from "../src/config/setup-test-container.mjs"; import { f } from "./helpers.mjs"; -import { AbortError } from "fauna"; describe("ensureContainerRunning", () => { let container, @@ -148,7 +148,7 @@ Please pass a --hostPort other than '8443'.", it("Exits with an expected error if teh query aborts", async () => { setupCreateContainerMocks(); const { runQuery } = container.resolve("faunaClientV10"); - runQuery.rejects(new AbortError({ error: { abort: "Taco" }})); + runQuery.rejects(new AbortError({ error: { abort: "Taco" } })); try { await run(`local --no-color --database Foo`, container); } catch (_) {} @@ -159,7 +159,7 @@ Please pass a --hostPort other than '8443'.", options: { format: "decorated" }, }); const written = stderrStream.getWritten(); - expect(written).to.contain('Taco'); + expect(written).to.contain("Taco"); expect(written).not.to.contain("fauna local"); expect(written).not.to.contain("An unexpected"); });