Skip to content

Commit

Permalink
fix: some test type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
yashim-deriv committed Aug 1, 2024
1 parent d8a6d70 commit 8b03d45
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ describe('useAdvertiserCreate', () => {
});

it('should return modified data if the data is ready', () => {
// @ts-expect-error not all values are defined
mockUseP2PAdvertiserCreate.mockReturnValueOnce({
// @ts-expect-error not all values are defined
data: {
...mockAdvertiserCreateValues,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ describe('useAdvertiserList', () => {

it('should return modified data if the data is ready', () => {
const mockData = { ...mockAdvertiserCreateValues, is_blocked: 0 as const };
// @ts-expect-error not all properties are defined

mockUseP2pAdvertiserList.mockReturnValueOnce({
data: [
// @ts-expect-error not all properties are defined
{
...mockData,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ describe('useAdvertiserUpdate', () => {
});

it('should return modified data if the data is ready', () => {
// @ts-expect-error not all values are defined
mockUseP2pAdvertiserUpdate.mockReturnValueOnce({
// @ts-expect-error not all values are defined
data: {
...mockAdvertiserCreateValues,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ describe('useOrderDispute', () => {
});

it('should return the correct data', () => {
// @ts-expect-error - useQuery return values not specified
mockUseP2pOrderDispute.mockReturnValue({
data: {
account_currency: 'USD',
Expand All @@ -54,6 +53,7 @@ describe('useOrderDispute', () => {
payment_method: 'payment_method',
type: 'buy',
},
// @ts-expect-error - useQuery return values not specified
advertiser_details: {
completed_orders_count: 1,
first_name: 'first_name',
Expand Down

0 comments on commit 8b03d45

Please sign in to comment.