Skip to content

Commit

Permalink
feat: added test to check boolean type
Browse files Browse the repository at this point in the history
  • Loading branch information
Gonzalo Bustos committed Aug 15, 2023
1 parent efc70aa commit 7ee9252
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/matchers/bool.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import { Bool } from "snarkyjs";
import { Bool, Field } from "snarkyjs";
import "../../lib/index"
import "../../lib/types"

describe("boolMatchers", () => {
describe("Wrong Type", () => {
it("should not pass when variable is not Bool", () => {
const value = new Field(1);
expect(() => expect(value).toBeTrue()).toThrowError("Expected 1 to be a Bool");
});
});
describe("toBeTrue", () => {
it("should pass when the value is true", () => {
const value = new Bool(true);
Expand Down

0 comments on commit 7ee9252

Please sign in to comment.