* YOYO NEW API SPEC! * updating gen files * handle enums for examples * fix tests * allow hidden endpoints * Generated new lib --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
19 lines
443 B
TypeScript
19 lines
443 B
TypeScript
import { unit } from '../../src/index.js';
|
|
|
|
async function example() {
|
|
const response = await unit.get_current_unit_conversion({
|
|
input_unit: 'amperes',
|
|
output_unit: 'microamperes',
|
|
value: 7,
|
|
});
|
|
if ('error_code' in response) throw response;
|
|
|
|
return response;
|
|
}
|
|
|
|
describe('Testing unit.get_current_unit_conversion', () => {
|
|
it('should be truthy or throw', async () => {
|
|
expect(await example()).toBeTruthy();
|
|
});
|
|
});
|