Skip to content

Commit

Permalink
fix hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
shahthepro committed Jan 9, 2025
1 parent 5ade3a2 commit 16a532b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions contracts/test/_global-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const {
isHoleskyFork,
isBaseFork,
isBaseUnitTest,
isSonicFork,
isSonicUnitTest,
} = require("./helpers");

const _chunkId = Number(process.env.CHUNK_ID);
Expand Down Expand Up @@ -46,6 +48,8 @@ mocha.before(function () {
const isArbTestFile = s.file.endsWith(".arb.fork-test.js");
const isBaseTestFile = s.file.endsWith(".base.fork-test.js");
const isBaseUnitTestFile = s.file.endsWith(".base.js");
const isSonicTestFile = s.file.endsWith(".sonic.fork-test.js");
const isSonicUnitTestFile = s.file.endsWith(".sonic.js");
const unitTest = !s.file.endsWith(".fork-test.js") && !isBaseUnitTestFile;

if (isArbFork) {
Expand All @@ -54,10 +58,14 @@ mocha.before(function () {
return isMainnetForkTestFile;
} else if (isBaseFork) {
return isBaseTestFile;
} else if (isSonicFork) {
return isSonicTestFile;
} else if (isHoleskyFork) {
return isHoleskyTestFile;
} else if (isBaseUnitTest) {
return isBaseUnitTestFile;
} else if (isSonicUnitTest) {
return isSonicUnitTestFile;
} else {
// else is unit test
return unitTest;
Expand Down

0 comments on commit 16a532b

Please sign in to comment.