Skip to content

Commit

Permalink
Failure mode tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cleve-fauna committed Dec 13, 2024
1 parent ebb3b8f commit 6ed139e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/local.mjs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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 (_) {}
Expand All @@ -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");
});
Expand Down

0 comments on commit 6ed139e

Please sign in to comment.