Skip to content

Commit

Permalink
test: more (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Jun 14, 2023
1 parent dcd6df1 commit 77d2d7d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/api.test.js
Expand Up @@ -306,7 +306,21 @@ describe("api", () => {
}
});

it("should allow to enable and disable validation using API", () => {
it.only("should allow to enable and disable validation using API", () => {
process.env.SKIP_VALIDATION = "unknown";
expect(needValidate()).toBe(true);

process.env.SKIP_VALIDATION = "no";
expect(needValidate()).toBe(true);

process.env.SKIP_VALIDATION = "yes";
expect(needValidate()).toBe(false);

enableValidation();
expect(process.env.SKIP_VALIDATION).toBe("n");

process.env.SKIP_VALIDATION = "undefined";

enableValidation();
expect(needValidate()).toBe(true);

Expand Down

0 comments on commit 77d2d7d

Please sign in to comment.