Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement updateCustomerPassword as no-op. #1031

Merged
merged 2 commits into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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