Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
lenkan committed Sep 3, 2024
1 parent 8032ce2 commit ef8e3c3
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions examples/integration-scripts/challenge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,9 @@ test('challenge', async () => {

// List Client 1 contacts
let contacts1 = await client1.contacts().list();
let bobContact = contacts1.find(
(contact: { alias: string }) => contact.alias === 'bob'
);
expect(bobContact.alias).toEqual('bob');
expect(bobContact.challenges).toHaveLength(0);
let bobContact = contacts1.find((contact) => contact.alias === 'bob');
expect(bobContact?.alias).toEqual('bob');
expect(bobContact?.challenges).toHaveLength(0);

// Bob responds to Alice challenge
await client2.challenges().respond('bob', aid1.i, challenge1_small.words);
Expand All @@ -125,10 +123,9 @@ test('challenge', async () => {

// Check Bob's challenge in conctats
contacts1 = await client1.contacts().list();
bobContact = contacts1.find(
(contact: { alias: string }) => contact.alias === 'bob'
);
expect(bobContact.challenges[0].authenticated).toEqual(true);
bobContact = contacts1.find((contact) => contact.alias === 'bob');

expect(bobContact?.challenges).toEqual([{ authenticated: true }]);

await assertOperations(client1, client2);
}, 30000);

0 comments on commit ef8e3c3

Please sign in to comment.