Skip to content

Commit

Permalink
fix: ts test
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalnarkhede committed Feb 2, 2024
1 parent 20b4726 commit 34c8a89
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
14 changes: 9 additions & 5 deletions test/typescript/response-generators/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,15 @@ async function listCommands() {
} catch {
// No command to delete
}
await authClient.createCommand({
description: 'testListCommand',
name: 'testListCommand',
set: 'testListCommand_set',
});
try {
await authClient.createCommand({
description: 'testListCommand',
name: 'testListCommand',
set: 'testListCommand_set',
});
} catch {
// Command exists
}
const result = await authClient.listCommands();
await authClient.deleteCommand('testListCommand');
return result;
Expand Down
9 changes: 7 additions & 2 deletions test/typescript/response-generators/moderation.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,13 @@ async function deleteBlockList() {
await cleanupBlockList(client, name);
await cleanupBlockList(client, name2);

await client.createBlockList({ name, words: ['F*!k'] });
await client.createBlockList({ name: name2, words: ['S!*t'] });
try {
await client.createBlockList({ name, words: ['F*!k'] });
await client.createBlockList({ name: name2, words: ['S!*t'] });
} catch (err) {
// in case the blocklist already exists
// do nothing
}

const returnValue = await client.deleteBlockList(name);
await client.deleteBlockList(name2);
Expand Down

0 comments on commit 34c8a89

Please sign in to comment.