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:
Kurt Hutten
2022-08-12 19:25:16 +10:00
committed by GitHub
parent 092945ca49
commit adb5278325
148 changed files with 18681 additions and 14531 deletions

View File

@ -0,0 +1,18 @@
import { unit } from '../../src/index.js';
async function example() {
const response = await unit.get_angular_velocity_unit_conversion({
output_format: 'radians_per_second',
src_format: 'degrees_per_second',
value: 7,
});
if ('error_code' in response) throw response;
return response;
}
describe('Testing unit.get_angular_velocity_unit_conversion', () => {
it('should be truthy or throw', async () => {
expect(await example()).toBeTruthy();
});
});