fix for number input, new integer input
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -24,7 +24,13 @@ test ('no number', (t) => {
|
||||
|
||||
test ('number', async (t) => {
|
||||
const validator = new TypeValidation ('number');
|
||||
const res = await validator.to_type ('123');
|
||||
const res = await validator.to_type ('123.4');
|
||||
t.is (res, 123.4);
|
||||
});
|
||||
|
||||
test ('int', async (t) => {
|
||||
const validator = new TypeValidation ('int');
|
||||
const res = await validator.to_type ('123.4');
|
||||
t.is (res, 123);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user