Skip to content

Commit

Permalink
test: length method
Browse files Browse the repository at this point in the history
  • Loading branch information
boray committed Sep 8, 2024
1 parent 550b5d1 commit 6e8bc95
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/lib/provable/test/string.unit-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,18 @@ describe('Circuit String', () => {
});
});

describe('#length', () => {
test('length', async () => {
const str1 = CircuitString.fromString('abcd');
expect(str1.length()).toEqual(Field(4));

await Provable.runAndCheck(() => {
const str1 = CircuitString.fromString('abcd');
expect(str1.length()).toEqual(Field(4));
});
});
});

/* describe('CircuitString8', async () => {
test('cannot create more than 8 chars', () => {
expect(() => {
Expand Down

0 comments on commit 6e8bc95

Please sign in to comment.