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

Commit

Permalink
fix: orders integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
gigobyte committed May 9, 2020
1 parent 17c4439 commit c77f731
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,6 @@ export class HttpClient {
try {
return await this.fetch(config).then((x) => parseResponse(x))
} catch (error) {
// eslint-disable-next-line no-console, unicorn/no-null
console.dir({ error }, { depth: null })

throw new HttpError(error)
}
}
Expand Down
9 changes: 7 additions & 2 deletions test/integration/orders.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ const httpClient = new HttpClient({

/* eslint-disable jest/no-standalone-expect */
describe(`${Orders.name}`, () => {
itci('should be able to query marketplace participation', async () => {
itci('should be able to query list orders', async () => {
expect.assertions(1)

const orders = new Orders(httpClient)
const createdAfter = new Date()
createdAfter.setFullYear(2017)

const [listOrders] = await orders.listOrders({ MarketplaceId: [amazonMarketplaces.CA.id] })
const [listOrders] = await orders.listOrders({
MarketplaceId: [amazonMarketplaces.CA.id],
CreatedAfter: createdAfter.toISOString(),
})

expect(listOrders.Orders.Order).toContainEqual(
expect.objectContaining({ MarketplaceId: amazonMarketplaces.CA.id }),
Expand Down

0 comments on commit c77f731

Please sign in to comment.