Skip to content

Commit

Permalink
fix: convert to node 20 compatible dirname
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewkeil committed Dec 20, 2024
1 parent b5bc7e0 commit 6f79cbe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ssz/test/spec/eip-4881/eip4881.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import fs from "node:fs";
import url from "node:url";
import path from "node:path";
import jsyaml from "js-yaml";
import {expect} from "chai";
Expand All @@ -24,7 +25,7 @@ const EIP4881TestDataArray = new ListCompositeType(EIP4881TestDataArrayItem, 102
describe("EIP-4881", function () {
this.timeout(60 * 1000);

const ymlStr = fs.readFileSync(path.join(path.dirname(import.meta.url), "test_data.yaml"), "utf8");
const ymlStr = fs.readFileSync(path.join(path.dirname(url.fileURLToPath(import.meta.url)), "test_data.yaml"), "utf8");
const json = jsyaml.load(ymlStr) as unknown[];
expect(json.length).to.be.equal(512);
const testData = EIP4881TestDataArray.fromJson(json);
Expand Down

0 comments on commit 6f79cbe

Please sign in to comment.