Skip to content

Commit 542356f

Browse files
committed
chore: add temporal coupling warnings
One of the test cases experiences temporal coupling with the getConnected() method. I tried to move the method call down to where it is used and that broke the test.
1 parent 501014d commit 542356f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ export class HypercertClient implements HypercertClientInterface {
159159
* @throws Will throw a `ClientError` if any validation or request submission fails.
160160
*/
161161
mintHypercert = async ({ metaData, totalUnits, transferRestriction, allowList, overrides }: MintParams) => {
162+
// FYI: one test case is temporally coupled with this.getConnected()
162163
const { account } = this.getConnected();
163164

164165
let tree;

test/client.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ describe("HypercertClient setup tests", () => {
3838
const client = new HypercertClient({ environment: "test", publicClient });
3939

4040
// mintClaim
41+
// This test case is a bit brittle as it relies on the getConnected() method being called at the top of mintHypercert()
4142
try {
4243
const metaData = { name: "test" } as HypercertMetadata;
4344
const totalUnits = 1n;

0 commit comments

Comments
 (0)