Skip to content

Commit

Permalink
reduce fragility of e2e-tests (toContain instead of toBe)
Browse files Browse the repository at this point in the history
  • Loading branch information
nomo-app committed Dec 4, 2023
1 parent 019ee4f commit c213956
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/e2e/build-webon-test/invalid-build-options.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { getDebugPath } from "../../../src/util/util";

test("assetDir not existing", async () => {
const output = await runE2ETestExpectFailure("build some-non-existing-dir");
expect(output).toBe(
expect(output).toContain(
`ERROR: ${getDebugPath("some-non-existing-dir")} does not exist.\n`
);
});

test("assetDir not a dir", async () => {
const output = await runE2ETestExpectFailure("build README.md");
expect(output).toBe(
expect(output).toContain(
`ERROR: ${getDebugPath("README.md")} is not a directory.\n`
);
});
4 changes: 2 additions & 2 deletions test/e2e/deploy-webon-test/invalid-deploy-options.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ test("archive not existing", async () => {
const output = await runE2ETestExpectFailure(
"deploy some-non-existing-archive production"
);
expect(output).toBe(
expect(output).toContain(
`ERROR: ${getDebugPath("some-non-existing-archive")} does not exist.\n`
);
});

test("archive not a file", async () => {
const output = await runE2ETestExpectFailure("deploy src production");
expect(output).toBe(`ERROR: ${getDebugPath("src")} is a directory.\n`);
expect(output).toContain(`ERROR: ${getDebugPath("src")} is a directory.\n`);
});

test("invalid archive, not a .tar.gz", async () => {
Expand Down

0 comments on commit c213956

Please sign in to comment.