Skip to content

Commit b70f212

Browse files
authored
fix: add separate import path for test utilities (#83)
1 parent 6e69fdc commit b70f212

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
export * from "./test/fixtures/SpokePool.Fixture";
2-
export * from "./test/fixtures/HubPool.Fixture";
3-
export * from "./test/fixtures/MerkleLib.Fixture";
4-
export * from "./test/constants";
5-
export * from "./test/utils";
61
export * from "./typechain";

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@across-protocol/contracts-v2",
3-
"version": "0.0.24",
3+
"version": "0.0.25",
44
"author": "UMA Team",
55
"license": "AGPL-3.0",
66
"repository": {

test-utils.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Note: this file sits on a separate export path and is intended to export test utilities and code:
2+
// You can import it like this: import * as testUtils from "@across-protocol/contracts-v2/dist/test-utils".
3+
// This is separated because this code assumes the caller has a hardhat config because it imports
4+
// hardhat. For non-test code, import the standard index file:
5+
// import * as contracts-v2 from "@across-protocol/contracts-v2"
6+
export * from "./test/fixtures/SpokePool.Fixture";
7+
export * from "./test/fixtures/HubPool.Fixture";
8+
export * from "./test/fixtures/MerkleLib.Fixture";
9+
export * from "./test/constants";
10+
export * from "./test/utils";

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"declaration": true,
99
"skipLibCheck": true
1010
},
11-
"include": ["./scripts", "./test", "./typechain", "./index.ts"],
11+
"include": ["./scripts", "./test", "./typechain", "./index.ts", "./test-utils.ts"],
1212
"files": ["./hardhat.config.ts"]
1313
}

0 commit comments

Comments
 (0)