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

Commit

Permalink
fix: bring back failing for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
justinemmanuelmercado committed Jun 3, 2020
1 parent 1381b53 commit 12536fb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
5 changes: 4 additions & 1 deletion src/sections/products/codec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ export const ListMatchingProductsResponse = Codec.interface({
}),
})

export const GetMatchingProductResult = ensureArray('GetMatchingProductResult', unknown)
export const GetMatchingProductResult = ensureArray(
'GetMatchingProductResult',
SingleProductInterface,
)

export const GetMatchingProductResponse = Codec.interface({
GetMatchingProductResponse: GetMatchingProductResult,
Expand Down
7 changes: 0 additions & 7 deletions test/unit/__fixtures__/products_get_matching_product.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
<GetMatchingProductResponse xmlns="http://mws.amazonservices.com/schema/Products/2011-10-01">
<GetMatchingProductResult ASIN="B002KT3XRQ" IdType="ASIN" status="ClientError">
<Error>
<Type>Sender</Type>
<Code>InvalidParameterValue</Code>
<Message>Invalid ISBN identifier 0439708623 for marketplace ATVPDKIKX0DER</Message>
</Error>
</GetMatchingProductResult>
<GetMatchingProductResult ASIN="B002KT3XRQ" status="Success">
<Product xmlns="http://mws.amazonservices.com/schema/Products/2011-10-01" xmlns:ns2="http://mws.amazonservices.com/schema/Products/2011-10-01/default.xsd">
<Identifiers>
Expand Down
7 changes: 0 additions & 7 deletions test/unit/__snapshots__/products.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -584,13 +584,6 @@ Array [
exports[`products getMatchingProduct returns a matching product when the response is valid 1`] = `
Array [
Array [
Object {
"Error": Object {
"Code": "InvalidParameterValue",
"Message": "Invalid ISBN identifier 0439708623 for marketplace ATVPDKIKX0DER",
"Type": "Sender",
},
},
Object {
"Product": Object {
"AttributeSets": Object {
Expand Down

0 comments on commit 12536fb

Please sign in to comment.