2022-08-12 19:25:16 +10:00
|
|
|
import { unit } from '../../src/index.js';
|
|
|
|
|
|
|
|
async function example() {
|
2023-06-01 10:07:07 +10:00
|
|
|
const response = await unit.get_current_unit_conversion({
|
|
|
|
input_unit: 'amperes',
|
|
|
|
output_unit: 'microamperes',
|
2022-08-12 19:25:16 +10:00
|
|
|
value: 7,
|
|
|
|
});
|
|
|
|
if ('error_code' in response) throw response;
|
|
|
|
|
|
|
|
return response;
|
|
|
|
}
|
|
|
|
|
2023-06-01 10:07:07 +10:00
|
|
|
describe('Testing unit.get_current_unit_conversion', () => {
|
2022-08-12 19:25:16 +10:00
|
|
|
it('should be truthy or throw', async () => {
|
|
|
|
expect(await example()).toBeTruthy();
|
|
|
|
});
|
|
|
|
});
|