Skip to content

Commit 1709df0

Browse files
chore: assert node helpers (generated)
algolia/api-clients-automation#3689 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 7215eba commit 1709df0

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

packages/algoliasearch/__tests__/algoliasearch.fetch.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,12 @@ test('sets the ua', () => {
1010
value: expect.stringContaining(`Algolia for JavaScript (${apiClientVersion}); Search (${apiClientVersion}); Fetch`),
1111
});
1212
});
13+
14+
test('forwards node search helpers', () => {
15+
expect(client.generateSecuredApiKey).not.toBeUndefined();
16+
expect(client.getSecuredApiKeyRemainingValidity).not.toBeUndefined();
17+
expect(() => {
18+
const resp = client.generateSecuredApiKey({ parentApiKey: 'foo', restrictions: { validUntil: 200 } });
19+
client.getSecuredApiKeyRemainingValidity({ securedApiKey: resp });
20+
}).not.toThrow();
21+
});

packages/algoliasearch/__tests__/algoliasearch.node.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,12 @@ test('sets the ua', () => {
1212
),
1313
});
1414
});
15+
16+
test('forwards node search helpers', () => {
17+
expect(client.generateSecuredApiKey).not.toBeUndefined();
18+
expect(client.getSecuredApiKeyRemainingValidity).not.toBeUndefined();
19+
expect(() => {
20+
const resp = client.generateSecuredApiKey({ parentApiKey: 'foo', restrictions: { validUntil: 200 } });
21+
client.getSecuredApiKeyRemainingValidity({ securedApiKey: resp });
22+
}).not.toThrow();
23+
});

0 commit comments

Comments
 (0)