Skip to content

Commit 7c03f7c

Browse files
committed
fixed platform-specific test
1 parent 8687f02 commit 7c03f7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/unit/core/compile/circom-compiler-factory.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe("CircomCompilerFactory", () => {
3838
});
3939

4040
async function checkPlatformSpecificCompiler(osType: NodeJS.Platform) {
41-
const compilerDir = path.join(os.homedir(), ".zkit", "compilers", LATEST_SUPPORTED_CIRCOM_VERSION);
41+
const compilerDir = path.join(os.homedir(), ".zkit", "compilers");
4242
fsExtra.rmSync(compilerDir, { recursive: true, force: true });
4343

4444
const platformStub = stub(os, "platform").callsFake(() => {
@@ -55,7 +55,7 @@ describe("CircomCompilerFactory", () => {
5555
expect(compiler).to.be.instanceof(BinaryCircomCompiler);
5656
}
5757

58-
expect(fsExtra.readdirSync(compilerDir)).to.be.deep.equal([platform]);
58+
expect(fsExtra.readdirSync(path.join(compilerDir, LATEST_SUPPORTED_CIRCOM_VERSION))).to.be.deep.equal([platform]);
5959

6060
fsExtra.rmSync(compilerDir, { recursive: true, force: true });
6161
platformStub.restore();

0 commit comments

Comments
 (0)