Skip to content

Commit 8cf16cf

Browse files
committed
update unit test
1 parent 8498285 commit 8cf16cf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/client/src/relewise.client.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ export abstract class RelewiseClient {
7979
const responseMessage = await response.json();
8080
return responseMessage as TResponse;
8181
} catch (err) {
82-
console.error(err);
8382
return undefined;
8483
}
8584
}

packages/client/tests/integration-tests/tracker.integration.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ test('Track Product View with invalid key', async() => {
172172
}).catch((e) => {
173173
expect(e).toBeDefined();
174174
expect((e as ProblemDetailsError).details?.title).toEqual('Unauthorized');
175-
expect(e.message).toEqual('Error when calling the Relewise API. Read more in the details property if there is error response or look in the network tab.')
175+
expect(e.message).toContain('Error when calling the Relewise API.')
176+
expect(e.message).toContain('Title: Unauthorized')
177+
expect(e.message).toContain('Status: 401')
176178
});
177179
});
178180

0 commit comments

Comments
 (0)