Skip to content

Commit 5c50673

Browse files
nunomaduroHaroenv
andcommitted
fix(account-client-copy): returns undefined instead of promise
Co-Authored-By: Haroen Viaene <[email protected]>
1 parent b066052 commit 5c50673

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/client-account/src/__tests__/integration/account-copy-index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ describe(testSuite.testName, () => {
100100
.algoliasearch(`${process.env.ALGOLIA_APPLICATION_ID_2}`, addApiKeyResponse.key)
101101
.initIndex(indexName);
102102

103-
await expect(accountCopyIndex(source, destination)).rejects.toMatchObject({
103+
await expect(accountCopyIndex(source, destination).wait()).rejects.toMatchObject({
104104
name: 'ApiError',
105105
message: 'Not enough rights to update an object near line:1 column:64',
106106
status: 400,

packages/client-account/src/methods/accountCopyIndex.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const accountCopyIndex = (
6464
* we need to resolve that array of async responses using a
6565
* `Promise.all`, and then resolve `void` for the end-user.
6666
*/
67-
promise.then(() => Promise.all(responses)).then(() => Promise.resolve()),
67+
promise.then(() => Promise.all(responses)).then(() => undefined),
6868

6969
/**
7070
* Next, if the end-user calls the `wait` method, we need to also call

0 commit comments

Comments
 (0)