Skip to content

Commit

Permalink
Replace import assertions with import attributes (#943)
Browse files Browse the repository at this point in the history
  • Loading branch information
divergentdave authored Jul 29, 2024
1 parent 3fc3133 commit cbbeba7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions packages/prio3/src/prio3.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import {
import { TestFlp128 } from "./flp.spec.js";
import { XofTurboShake128 } from "@divviup/xof";
import type { TestVector } from "@divviup/vdaf";
import countTestVector0 from "./testVectors/Prio3Count_0.json" assert { type: "json" };
import countTestVector1 from "./testVectors/Prio3Count_1.json" assert { type: "json" };
import histogramTestVector0 from "./testVectors/Prio3Histogram_0.json" assert { type: "json" };
import histogramTestVector1 from "./testVectors/Prio3Histogram_1.json" assert { type: "json" };
import sumTestVector0 from "./testVectors/Prio3Sum_0.json" assert { type: "json" };
import sumTestVector1 from "./testVectors/Prio3Sum_1.json" assert { type: "json" };
import sumVecTestVector0 from "./testVectors/Prio3SumVec_0.json" assert { type: "json" };
import sumVecTestVector1 from "./testVectors/Prio3SumVec_1.json" assert { type: "json" };
import sumVecMultiproofTestVector0 from "./testVectors/Prio3SumVecField64Multiproof_0.json" assert { type: "json" };
import sumVecMultiproofTestVector1 from "./testVectors/Prio3SumVecField64Multiproof_1.json" assert { type: "json" };
import countTestVector0 from "./testVectors/Prio3Count_0.json" with { type: "json" };
import countTestVector1 from "./testVectors/Prio3Count_1.json" with { type: "json" };
import histogramTestVector0 from "./testVectors/Prio3Histogram_0.json" with { type: "json" };
import histogramTestVector1 from "./testVectors/Prio3Histogram_1.json" with { type: "json" };
import sumTestVector0 from "./testVectors/Prio3Sum_0.json" with { type: "json" };
import sumTestVector1 from "./testVectors/Prio3Sum_1.json" with { type: "json" };
import sumVecTestVector0 from "./testVectors/Prio3SumVec_0.json" with { type: "json" };
import sumVecTestVector1 from "./testVectors/Prio3SumVec_1.json" with { type: "json" };
import sumVecMultiproofTestVector0 from "./testVectors/Prio3SumVecField64Multiproof_0.json" with { type: "json" };
import sumVecMultiproofTestVector1 from "./testVectors/Prio3SumVecField64Multiproof_1.json" with { type: "json" };
import { FlpGeneric } from "./genericFlp.js";
import { SumVec } from "./circuits/sumVec.js";
import { Field64 } from "@divviup/field";
Expand Down
2 changes: 1 addition & 1 deletion packages/xof/src/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { assert } from "chai";
import { XofTurboShake128 } from "./index.js";
import { Field128, Field64 } from "@divviup/field";
import XofTurboShake128TestVector from "./testVectors/XofTurboShake128.json" assert { type: "json" };
import XofTurboShake128TestVector from "./testVectors/XofTurboShake128.json" with { type: "json" };

function assertBuffersEqual(x: Uint8Array, y: Uint8Array) {
assert.equal(Buffer.from(x).toString("hex"), Buffer.from(y).toString("hex"));
Expand Down

0 comments on commit cbbeba7

Please sign in to comment.