Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
fix(tests): simplify relayUrl passing
Browse files Browse the repository at this point in the history
  • Loading branch information
bkrem committed Mar 21, 2023
1 parent 1f73330 commit 0e42c24
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/auth-client/test/client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,21 @@ describe("AuthClient", () => {
let wallet: Wallet;
let iss: string;

const relayUrl = process.env.TEST_RELAY_URL || "wss://staging.relay.walletconnect.com";

// Set up a wallet to use as the external signer.
beforeAll(() => {
wallet = Wallet.createRandom();
});

console.log("projectId: ", process.env.TEST_PROJECT_ID);
console.log("relayUrl: ", process.env.TEST_RELAY_URL);
console.log("relayUrl: ", relayUrl);

beforeEach(async () => {
client = await AuthClient.init({
name: "testClient",
logger: "error",
relayUrl: process.env.TEST_RELAY_URL || "wss://staging.relay.walletconnect.com",
relayUrl,
projectId: process.env.TEST_PROJECT_ID!,
storageOptions: {
database: ":memory:",
Expand All @@ -77,7 +79,7 @@ describe("AuthClient", () => {
peer = await AuthClient.init({
name: "testPeer",
logger: "error",
relayUrl: process.env.TEST_RELAY_URL || "wss://staging.relay.walletconnect.com",
relayUrl,
projectId: process.env.TEST_PROJECT_ID!,
storageOptions: {
database: ":memory:",
Expand Down Expand Up @@ -423,7 +425,7 @@ describe("AuthClient", () => {
let receivedMetadataName = "";
client = await AuthClient.init({
logger: "error",
relayUrl: process.env.TEST_RELAY_URL || "wss://staging.relay.walletconnect.com",
relayUrl,
projectId: process.env.TEST_PROJECT_ID!,
storageOptions: {
database: ":memory:",
Expand Down

0 comments on commit 0e42c24

Please sign in to comment.