19 lines
396 B
TypeScript
19 lines
396 B
TypeScript
// Copyright 2017-2020 @polkadot/util authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import { isNumber } from '.';
|
|
|
|
describe('isNumber', (): void => {
|
|
it('returns true on valid numbers', (): void => {
|
|
expect(
|
|
isNumber(2)
|
|
).toEqual(true);
|
|
});
|
|
|
|
it('returns false on invalid numbers', (): void => {
|
|
expect(
|
|
isNumber('2')
|
|
).toEqual(false);
|
|
});
|
|
});
|