Skip to content

Commit

Permalink
fix: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DimiDumo committed Nov 27, 2024
1 parent 0e92b06 commit 909d0a2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions ts_tests/circuit_intput.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// TODO: Can only run one test file at a time, since init() will colide
import { expect, test, describe } from "bun:test";
// import init, { parseEmail } from "../pkg";
import { generateCircuitInputsWithDecomposedRegexesAndExternalInputs } from "../pkg/index.node";
import { generateCircuitInputsWithDecomposedRegexesAndExternalInputs, init } from "../pkg";
import { readFile } from "fs/promises";

describe("generateCircuitInputsWithDecomposedRegexesAndExternalInputs test suite", async () => {
await init();
const helloEml = await readFile("tests/fixtures/test.eml", "utf-8");
console.log("got eml: ", helloEml);

Expand Down
3 changes: 2 additions & 1 deletion ts_tests/parse_email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
* TODO: Make jest ignore this
* This file does not work with jest, so for now we renamed it so it doesn't run.
*/
// TODO: Can only run one test file at a time, since init() will colide
import { expect, test, describe } from "bun:test";

import init, { parseEmail } from "../pkg";
import { parseEmail, init } from "../pkg";
import airbnbEmail from "./airbnb_eml";

describe("Parse email test suite", async () => {
Expand Down
4 changes: 3 additions & 1 deletion ts_tests/sha_256_pad.test.ts → ts_tests/sha_256_pad.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// TODO: Can only run one test file at a time, since init() will colide
import { expect, test, describe } from "bun:test";
import { sha256Pad } from "../pkg/index.node";
import { sha256Pad, init } from "../pkg";

describe("sha256Pad test suite", async () => {
await init();
test("should pad", async () => {
try {
const text = "yellow is the new dark blue";
Expand Down

0 comments on commit 909d0a2

Please sign in to comment.