ts-jest[ts-jest-transformer] (WARN) Define `ts-jest` config under `globals` is deprecated. Please do transform: { : ['ts-jest', { /* ts-jest config goes here in Jest */ }], }, See more at https://kulshekhar.github.io/ts-jest/docs/getting-started/presets#advanced (node:2639) ExperimentalWarning: VM Modules is an experimental feature and might change at any time (Use `node --trace-warnings ...` to show where the warning was created) PASS src/lib/provable/test/int.test.ts (5.508 s) int Int64 toString ✓ should be the same as Field(0) (3 ms) ✓ should be -1 ✓ should be the same as 2^53-1 (1 ms) zero ✓ should be the same as Field(0) (1 ms) fromUnsigned ✓ should be the same as UInt64.zero (1 ms) ✓ should be the same as UInt64.MAXINT (1 ms) neg ✓ neg(1)=-1 (1 ms) ✓ neg(2^53-1)=-2^53-1 add ✓ 1+1=2 (1 ms) ✓ 5000+(-4000)=1000 ✓ (MAXINT/2+MAXINT/2) adds to MAXINT ✓ should throw on overflow (35 ms) ✓ should throw on overflow addition (1 ms) ✓ should not throw on non-overflowing addition ○ skipped operations should throw on overflow of any input sub ✓ 1-1=0 (1 ms) ✓ 10000-5000=5000 ✓ 0-1=-1 (1 ms) ✓ (0-MAXINT) subs to -MAXINT toFields ✓ toFields(1) should be the same as [Field(1), Field(1)] (1 ms) ✓ toFields(2^53-1) should be the same as Field(2^53-1) fromFields ✓ fromFields([1, 1]) should be the same as Int64.one (1 ms) ✓ fromFields(2^53-1) should be the same as Field(2^53-1) (1 ms) mul / div / mod ✓ mul, div and mod work (1 ms) UInt64 Inside circuit add ✓ 1+1=2 (874 ms) ✓ 5000+5000=10000 (4 ms) ✓ (MAXINT/2+MAXINT/2) adds to MAXINT (5 ms) ✓ should throw on overflow addition (817 ms) sub ✓ 1-1=0 (4 ms) ✓ 10000-5000=5000 (7 ms) ✓ should throw on sub if results in negative number (5 ms) mul ✓ 1x2=2 (5 ms) ✓ 1x0=0 (5 ms) ✓ 1000x1000=1000000 (7 ms) ✓ MAXINTx1=MAXINT (6 ms) ✓ should throw on overflow multiplication (6 ms) div ✓ 2/1=2 (5 ms) ✓ 0/1=0 (9 ms) ✓ 2000/1000=2 (4 ms) ✓ MAXINT/1=MAXINT (4 ms) ✓ should throw on division by zero (3 ms) mod ✓ 1%1=0 (5 ms) ✓ 500%32=20 (4 ms) ✓ MAXINT%7=1 (3 ms) ✓ should throw on mod by zero (2 ms) assertLt ✓ 1<2=true (2 ms) ✓ 1<1=false (7 ms) ✓ 2<1=false (3 ms) ✓ 1000<100000=true (2 ms) ✓ 100000<1000=false (3 ms) ✓ MAXINT1=true (2 ms) ✓ 1>1=false (5 ms) ✓ 1>2=false (4 ms) ✓ 100000>1000=true (4 ms) ✓ 1000>100000=false (5 ms) ✓ MAXINT>MAXINT=false (3 ms) assertGreaterThanOrEqual ✓ 1<=1=true (2 ms) ✓ 1>=2=false (3 ms) ✓ 100000>=1000=true (3 ms) ✓ 1000>=100000=false (3 ms) ✓ MAXINT>=MAXINT=true (2 ms) from() fromNumber() ✓ should be the same as Field(1) (2 ms) ✓ should be the same as 2^53-1 (5 ms) fromString() ✓ should be the same as Field(1) (2 ms) ✓ should be the same as 2^53-1 (2 ms) Outside of circuit add ✓ 1+1=2 (1 ms) ✓ 5000+5000=10000 ✓ (MAXINT/2+MAXINT/2) adds to MAXINT ✓ should throw on overflow addition sub ✓ 1-1=0 ✓ 10000-5000=5000 ✓ should throw on sub if results in negative number mul ✓ 1x2=2 ✓ 1x0=0 ✓ 1000x1000=1000000 ✓ MAXINTx1=MAXINT (1 ms) ✓ should throw on overflow multiplication div ✓ 2/1=2 (1 ms) ✓ 0/1=0 ✓ 2000/1000=2 ✓ MAXINT/1=MAXINT ✓ should throw on division by zero mod ✓ 1%1=0 (1 ms) ✓ 500%32=20 ✓ MAXINT%7=1 ✓ should throw on mod by zero (1 ms) lt ✓ 1<2=true ✓ 1<1=false ✓ 2<1=false ✓ 1000<100000=true ✓ 100000<1000=false ✓ MAXINT1=true ✓ 1>1=false ✓ 1>2=false (1 ms) ✓ 100000>1000=true ✓ 1000>100000=false ✓ MAXINT>MAXINT=false (1 ms) greaterThanOrEqual ✓ 2>=1=true ✓ 1>=1=true (1 ms) ✓ 1>=2=false ✓ 100000>=1000=true (1 ms) ✓ 1000>=100000=false ✓ MAXINT>=MAXINT=true (1 ms) assertGreaterThan ✓ 1>1=false (1 ms) ✓ 2>1=true ✓ 1000>100000=false (1 ms) ✓ 100000>1000=true (1 ms) ✓ MAXINT>MAXINT=false assertGreaterThanOrEqual ✓ 1>=1=true ✓ 2>=1=true ✓ 1000>=100000=false (1 ms) ✓ 100000>=1000=true (1 ms) ✓ MAXINT>=MAXINT=true toString() ✓ should be the same as Field(0) ✓ should be the same as 2^53-1 (1 ms) check() ✓ should pass checking a MAXINT ✓ should throw checking over MAXINT from() fromNumber() ✓ should be the same as Field(1) ✓ should be the same as 2^53-1 fromString() ✓ should be the same as Field(1) ✓ should be the same as 2^53-1 (1 ms) UInt32 Inside circuit add ✓ 1+1=2 (2 ms) ✓ 5000+5000=10000 (6 ms) ✓ (MAXINT/2+MAXINT/2) adds to MAXINT (2 ms) ✓ should throw on overflow addition (2 ms) sub ✓ 1-1=0 (3 ms) ✓ 10000-5000=5000 (1 ms) ✓ should throw on sub if results in negative number (2 ms) mul ✓ 1x2=2 (1 ms) ✓ 1x0=0 (1 ms) ✓ 1000x1000=1000000 (1 ms) ✓ MAXINTx1=MAXINT (2 ms) ✓ should throw on overflow multiplication (2 ms) div ✓ 2/1=2 (3 ms) ✓ 0/1=0 (2 ms) ✓ 2000/1000=2 (2 ms) ✓ MAXINT/1=MAXINT (5 ms) ✓ should throw on division by zero (2 ms) mod ✓ 1%1=0 (3 ms) ✓ 500%32=20 (2 ms) ✓ MAXINT%7=3 (3 ms) ✓ should throw on mod by zero (1 ms) assertLt ✓ 1<2=true (2 ms) ✓ 1<1=false (2 ms) ✓ 2<1=false (2 ms) ✓ 1000<100000=true (1 ms) ✓ 100000<1000=false (2 ms) ✓ MAXINT1=true (1 ms) ✓ 1>1=false (2 ms) ✓ 1>2=false (2 ms) ✓ 100000>1000=true (2 ms) ✓ 1000>100000=false (2 ms) ✓ MAXINT>MAXINT=false (2 ms) assertGreaterThanOrEqual ✓ 1<=1=true (2 ms) ✓ 1>=2=false (2 ms) ✓ 100000>=1000=true (2 ms) ✓ 1000>=100000=false (2 ms) ✓ MAXINT>=MAXINT=true (1 ms) from() fromNumber() ✓ should be the same as Field(1) (1 ms) ✓ should be the same as 2^53-1 (1 ms) fromString() ✓ should be the same as Field(1) (2 ms) ✓ should be the same as 2^53-1 (1 ms) Outside of circuit add ✓ 1+1=2 ✓ 5000+5000=10000 ✓ (MAXINT/2+MAXINT/2) adds to MAXINT (2 ms) ✓ should throw on overflow addition sub ✓ 1-1=0 (1 ms) ✓ 10000-5000=5000 ✓ should throw on sub if results in negative number mul ✓ 1x2=2 (1 ms) ✓ 1x0=0 ✓ 1000x1000=1000000 ✓ MAXINTx1=MAXINT (1 ms) ✓ should throw on overflow multiplication div ✓ 2/1=2 ✓ 0/1=0 (1 ms) ✓ 2000/1000=2 ✓ MAXINT/1=MAXINT ✓ should throw on division by zero (1 ms) mod ✓ 1%1=0 ✓ 500%32=20 ✓ MAXINT%7=3 ✓ should throw on mod by zero (1 ms) lessThan ✓ 1<2=true ✓ 1<1=false (1 ms) ✓ 2<1=false ✓ 1000<100000=true (1 ms) ✓ 100000<1000=false ✓ MAXINT1=true ✓ 1>1=false ✓ 1>2=false ✓ 100000>1000=true ✓ 1000>100000=false (1 ms) ✓ MAXINT>MAXINT=false assertGreaterThan ✓ 1>1=false (1 ms) ✓ 2>1=true ✓ 1000>100000=false ✓ 100000>1000=true (1 ms) ✓ MAXINT>MAXINT=false greaterThanOrEqual ✓ 2>=1=true ✓ 1>=1=true ✓ 1>=2=false ✓ 100000>=1000=true ✓ 1000>=100000=false (1 ms) ✓ MAXINT>=MAXINT=true assertGreaterThanOrEqual ✓ 1>=1=true ✓ 2>=1=true ✓ 1000>=100000=false (1 ms) ✓ 100000>=1000=true ✓ MAXINT>=MAXINT=true toString() ✓ should be the same as Field(0) (1 ms) ✓ should be the same as 2^32-1 check() ✓ should pass checking a MAXINT ✓ should throw checking over MAXINT (1 ms) from() fromNumber() ✓ should be the same as Field(1) (1 ms) ✓ should be the same as 2^53-1 fromString() ✓ should be the same as Field(1) ✓ should be the same as 2^53-1 UInt8 Inside circuit add ✓ 1+1=2 (4 ms) ✓ 100+100=200 (2 ms) ✓ (MAXINT/2+MAXINT/2) adds to MAXINT (3 ms) ✓ should throw on overflow addition (5 ms) sub ✓ 1-1=0 (6 ms) ✓ 100-50=50 (3 ms) ✓ should throw on sub if results in negative number (3 ms) mul ✓ 1x2=2 (2 ms) ✓ 1x0=0 (2 ms) ✓ 12x20=240 (3 ms) ✓ MAXINTx1=MAXINT (2 ms) ✓ should throw on overflow multiplication (3 ms) div ✓ 2/1=2 (3 ms) ✓ 0/1=0 (2 ms) ✓ 20/10=2 (2 ms) ✓ MAXINT/1=MAXINT (2 ms) ✓ should throw on division by zero (2 ms) mod ✓ 1%1=0 (3 ms) ✓ 50%32=18 (4 ms) ✓ MAXINT%7=3 (2 ms) ✓ should throw on mod by zero (2 ms) assertLt ✓ 1<2=true (2 ms) ✓ 1<1=false (2 ms) ✓ 2<1=false (2 ms) ✓ 10<100=true (2 ms) ✓ 100<10=false (2 ms) ✓ MAXINT1=true (3 ms) ✓ 1>1=false (2 ms) ✓ 1>2=false (3 ms) ✓ 100>10=true (3 ms) ✓ 10>100=false (2 ms) ✓ MAXINT>MAXINT=false (4 ms) assertGreaterThanOrEqual ✓ 1<=1=true (3 ms) ✓ 1>=2=false (2 ms) ✓ 100>=10=true (2 ms) ✓ 10>=100=false (2 ms) ✓ MAXINT>=MAXINT=true (2 ms) from() fromNumber() ✓ should be the same as Field(1) (2 ms) Outside of circuit add ✓ 1+1=2 ✓ 50+50=100 ✓ (MAXINT/2+MAXINT/2) adds to MAXINT (1 ms) ✓ should throw on overflow addition sub ✓ 1-1=0 (1 ms) ✓ 100-50=50 ✓ should throw on sub if results in negative number (1 ms) mul ✓ 1x2=2 ✓ 1x0=0 ✓ 12x20=240 (1 ms) ✓ MAXINTx1=MAXINT ✓ should throw on overflow multiplication (1 ms) div ✓ 2/1=2 ✓ 0/1=0 ✓ 20/10=2 ✓ MAXINT/1=MAXINT ✓ should throw on division by zero mod ✓ 1%1=0 (1 ms) ✓ 50%32=18 ✓ MAXINT%7=3 ✓ should throw on mod by zero (1 ms) lessThan ✓ 1<2=true ✓ 1<1=false ✓ 2<1=false (1 ms) ✓ 10<100=true ✓ 100<10=false (2 ms) ✓ MAXINT1=true ✓ 1>1=false ✓ 1>2=false (1 ms) ✓ 100>10=true ✓ 10>100=false ✓ MAXINT>MAXINT=false assertGreaterThan ✓ 1>1=false (1 ms) ✓ 2>1=true ✓ 10>100=false ✓ 100000>1000=true (1 ms) ✓ MAXINT>MAXINT=false greaterThanOrEqual ✓ 2>=1=true (1 ms) ✓ 1>=1=true ✓ 1>=2=false ✓ 100>=10=true ✓ 10>=100=false (1 ms) ✓ MAXINT>=MAXINT=true assertGreaterThanOrEqual ✓ 1>=1=true ✓ 2>=1=true (1 ms) ✓ 10>=100=false ✓ 100>=10=true ✓ MAXINT>=MAXINT=true (1 ms) toString() ✓ should be the same as Field(0) ✓ should be the same as 2^8-1 check() ✓ should pass checking a MAXINT ✓ should throw checking over MAXINT (1 ms) from() fromNumber() ✓ should be the same as Field(1) ✓ should be the same as 2^53-1 (1 ms) Test Suites: 1 passed, 1 total Tests: 1 skipped, 360 passed, 361 total Snapshots: 0 total Time: 5.565 s, estimated 9 s Ran all test suites matching /src\/lib\/provable\/test\/int.test.ts/i. [ perf record: Woken up 332 times to write data ] [ perf record: Captured and wrote 86.172 MB src/lib/provable/test/int.test.ts.perf.data (10642 samples) ]