Skip to content

Commit eb5fd25

Browse files
committed
fix(e2e): always connect the client first before funding, so we can throw early
1 parent 7216000 commit eb5fd25

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

packages/e2e/src/e2e.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ describe('all', () => {
4343
// alicePkpAuthContext = await createPkpAuthContext(ctx);
4444
eveCustomAuthContext = await createCustomAuthContext(ctx);
4545
} catch (e) {
46-
console.error('❌ Failed to initialise E2E test context');
47-
console.error(e);
48-
throw e;
46+
console.error('❌ Failed to initialise E2E test context', e);
47+
process.exit(1);
4948
}
5049
});
5150

packages/e2e/src/init.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,18 @@ export const init = async (
141141
);
142142
}
143143

144-
// Fund accounts based on network type
144+
/**
145+
* ====================================
146+
* Initialise the LitClient
147+
* ====================================
148+
*/
149+
const litClient = await createLitClient({ network: _networkModule });
150+
151+
/**
152+
* ====================================
153+
* Fund accounts based on network type
154+
* ====================================
155+
*/
145156
const isLocal = config.type === 'local';
146157
const masterAccount = isLocal ? localMasterAccount : liveMasterAccount;
147158
const fundingAmount = isLocal
@@ -164,13 +175,6 @@ export const init = async (
164175
thenFundWith: fundingAmount,
165176
});
166177

167-
/**
168-
* ====================================
169-
* Initialise the LitClient
170-
* ====================================
171-
*/
172-
const litClient = await createLitClient({ network: _networkModule });
173-
174178
/**
175179
* ====================================
176180
* (Master) Initialise Payment Manager

0 commit comments

Comments
 (0)