MCPcopy
hub / github.com/autoNumeric/autoNumeric / testFunc

Function testFunc

test/unit/autoNumeric.spec.js:3637–3644  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

3635 it('should init the element with an initial value in scientific notation', () => {
3636 // Test the `scientificToDecimal` function directly
3637 function testFunc(value) {
3638 const decimalValue = AutoNumericHelper.scientificToDecimal(value);
3639 if (isNaN(Number(value))) {
3640 expect(decimalValue).toBeNaN();
3641 } else {
3642 expect(Number(decimalValue)).toEqual(Number(value));
3643 }
3644 }
3645 const valuesToTest = [
3646 '12345E1',
3647 '12345e3',

Callers

nothing calls this directly

Calls 1

scientificToDecimalMethod · 0.80

Tested by

no test coverage detected