Skip to content

Commit

Permalink
Implement updateCustomerPassword as no-op. (#1031)
Browse files Browse the repository at this point in the history
  • Loading branch information
wjhsf committed Mar 8, 2023
1 parent ddf5805 commit 246d484
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const cacheUpdateMatrix: CacheUpdateMatrix<Client> = {
update: [{queryKey: getCustomerAddress.queryKey(parameters)}]
}
},
updateCustomerPassword: TODO('updateCustomerPassword'),
updateCustomerPassword: noop,
updateCustomerProductList: TODO('updateCustomerProductList'),
updateCustomerProductListItem(customerId, {parameters}) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe('Shopper Customers hooks', () => {
// If this test fails: add cache update logic, remove the endpoint from the mutations enum,
// or add it to the `expected` array to indicate that it is still a TODO.
expect([...unimplemented]).toEqual([
'updateCustomerPassword',
'deleteCustomerProductList',
'updateCustomerProductList'
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ const createOptions = <Mut extends ShopperCustomersMutation>(
// leverage TypeScript to enforce having tests for all mutations.
const notImplTestCases: ShopperCustomersMutation[][] = [
['deleteCustomerProductList'],
['updateCustomerPassword'],
['updateCustomerProductList']
]

Expand Down Expand Up @@ -461,6 +460,13 @@ describe('ShopperCustomers mutations', () => {
login: 'login'
}),
undefined
],
updateCustomerPassword: [
createOptions<'updateCustomerPassword'>({
currentPassword: 'hunter2',
password: 'hunter3'
}),
undefined
]
}
// Type assertion because `Object.entries` is limited :\
Expand Down

0 comments on commit 246d484

Please sign in to comment.