Skip to content

Commit

Permalink
fix: fix broken testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
utkarsha-deriv committed Dec 25, 2023
1 parent bf68b6f commit c9ac0cd
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/hooks/useSubscription/__tests__/useSubscription.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,22 @@ describe('Use WS', () => {
},
});

expect(result.current.error).toEqual({ message: 'this is an error' });
expect(result.current.error).toEqual({
echo_req: {
base_currency: 'USD',
exchange_rates: 1,
req_id: 1,
subscribe: 1,
},
error: {
message: 'this is an error',
},
msg_type: 'exchange_rates',
req_id: 1,
subscription: {
id: '2f39f7e7-d986-33f2-080a-b0ee50cfb85c',
},
});
expect(result.current.is_loading).toBeFalsy();
});
});

0 comments on commit c9ac0cd

Please sign in to comment.