Skip to content

Commit 77d2d7d

Browse files
test: more (#184)
1 parent dcd6df1 commit 77d2d7d

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

test/api.test.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,21 @@ describe("api", () => {
306306
}
307307
});
308308

309-
it("should allow to enable and disable validation using API", () => {
309+
it.only("should allow to enable and disable validation using API", () => {
310+
process.env.SKIP_VALIDATION = "unknown";
311+
expect(needValidate()).toBe(true);
312+
313+
process.env.SKIP_VALIDATION = "no";
314+
expect(needValidate()).toBe(true);
315+
316+
process.env.SKIP_VALIDATION = "yes";
317+
expect(needValidate()).toBe(false);
318+
319+
enableValidation();
320+
expect(process.env.SKIP_VALIDATION).toBe("n");
321+
322+
process.env.SKIP_VALIDATION = "undefined";
323+
310324
enableValidation();
311325
expect(needValidate()).toBe(true);
312326

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy