generate examples (#5)
* update types * more type improvements * fix some gen test types * add body to file gen tests * enable error tests to pass * forget gen tests * split gen tests into throwing and not throwing * remove log noise from gen tests * generate tests and examples patch.json * format examples * add action for updating spec in docs * fmt * tweak token * formating examples * more formatting * update spec.json * add optional client * fix test methods and add client example * re-generate with new spec * fix dir removal
This commit is contained in:
18
__tests__/gen/users-delete_user_self.test.ts
Normal file
18
__tests__/gen/users-delete_user_self.test.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { users } from '../../src/index.js';
|
||||
|
||||
async function example() {
|
||||
const response = await users.delete_user_self();
|
||||
if ('error_code' in response) throw response;
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
describe('Testing users.delete_user_self', () => {
|
||||
it('should be truthy or throw', async () => {
|
||||
try {
|
||||
await example();
|
||||
} catch (err) {
|
||||
expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect
|
||||
}
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user