Skip to content

Commit

Permalink
Update chai
Browse files Browse the repository at this point in the history
  • Loading branch information
OBrezhniev committed Oct 12, 2024
1 parent f1f4377 commit 5cc3c71
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 69 deletions.
91 changes: 34 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@rollup/plugin-node-resolve": "^15.2.1",
"@rollup/plugin-replace": "^5.0.3",
"blake2b": "^2.1.3",
"chai": "^4.2.0",
"chai": "^5.1.1",
"eslint": "^9.12.0",
"mocha": "^10.7.3",
"rollup": "^3.29.4"
Expand Down
2 changes: 1 addition & 1 deletion test/algebra.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
zksnark JavaScript library. If not, see <https://www.gnu.org/licenses/>.
*/

import chai from "chai";
import * as chai from "chai";

import * as Scalar from "../src/scalar.js";
import buildBn128 from "../src/bn128.js";
Expand Down
4 changes: 3 additions & 1 deletion test/bn128.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import assert from "assert";
import * as chai from "chai";
import buildBn128 from "../src/bn128.js";
import {log2} from "../src/utils.js";
import BigBuffer from "../src/bigbuffer.js";

const assert = chai.assert;

describe("bn128", async function () {
this.timeout(0);

Expand Down
2 changes: 1 addition & 1 deletion test/pols.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
zksnark JavaScript library. If not, see <https://www.gnu.org/licenses/>.
*/

import chai from "chai";
import * as chai from "chai";

import * as Scalar from "../src/scalar.js";
import PolField from "../src/polfield.js";
Expand Down
2 changes: 1 addition & 1 deletion test/ratzqfield.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
zksnark JavaScript library. If not, see <https://www.gnu.org/licenses/>.
*/

import chai from "chai";
import * as chai from "chai";

import * as Scalar from "../src/scalar.js";
import ZqField from "../src/f1field.js";
Expand Down
5 changes: 3 additions & 2 deletions test/scalar.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import assert from "assert";

import * as chai from "chai";
import * as Scalar from "../src/scalar.js";

const assert = chai.assert;

describe("Basic scalar convertions", () => {
it("Should convertion Native", () => {
assert(Scalar.eq(Scalar.e("0x12"), 18));
Expand Down
2 changes: 1 addition & 1 deletion test/sqrt.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
zksnark JavaScript library. If not, see <https://www.gnu.org/licenses/>.
*/

import chai from "chai";
import * as chai from "chai";

import * as Scalar from "../src/scalar.js";
import buildBn128 from "../src/bn128.js";
Expand Down
6 changes: 3 additions & 3 deletions test/utils.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import assert from "assert";

import * as chai from "chai";
import * as ScalarN from "../src/scalar.js";

import * as utilsN from "../src/utils.js";

const assert = chai.assert;

describe("Utils native", () => {
const num = ScalarN.e("21888242871839275222246405745257275088614511777268538073601725287587578984328");

Expand Down
3 changes: 2 additions & 1 deletion test/zqfield.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import ZqField from "../src/f1field.js";
import * as Scalar from "../src/scalar.js";
import assert from "assert";
import * as chai from "chai";
const assert = chai.assert;

const q = Scalar.fromString("21888242871839275222246405745257275088696311157297823662689037894645226208583");
const r = Scalar.fromString("21888242871839275222246405745257275088548364400416034343698204186575808495617");
Expand Down

0 comments on commit 5cc3c71

Please sign in to comment.