Skip to content

Commit 78a4ee6

Browse files
committed
fix: await return and tests
1 parent a483037 commit 78a4ee6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clients/algoliasearch-client-javascript/packages/algoliasearch/__tests__/algoliasearch.node.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ test('forwards node search helpers', () => {
1818
const client = algoliasearch('APP_ID', 'API_KEY');
1919
expect(client.generateSecuredApiKey).not.toBeUndefined();
2020
expect(client.getSecuredApiKeyRemainingValidity).not.toBeUndefined();
21-
expect(async () => {
22-
const resp = await client.generateSecuredApiKey({ parentApiKey: 'foo', restrictions: { validUntil: 200 } });
21+
expect(() => {
22+
const resp = client.generateSecuredApiKey({ parentApiKey: 'foo', restrictions: { validUntil: 200 } });
2323
client.getSecuredApiKeyRemainingValidity({ securedApiKey: resp });
2424
}).not.toThrow();
2525
});

templates/javascript/clients/client/api/workerHelpers.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ generateSecuredApiKey: async ({
3232
);
3333

3434
const queryParameters = serializeQueryParameters(mergedRestrictions);
35-
return generateBase64Hmac(parentApiKey, queryParameters);
35+
return await generateBase64Hmac(parentApiKey, queryParameters);
3636
},

0 commit comments

Comments
 (0)