fix for number input, new integer input
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-07-19 11:41:06 +02:00
parent 7395241329
commit 7ad999878a
11 changed files with 75 additions and 10 deletions

View File

@ -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);
});