[bugfix] Stepper: integer in android (#1482)

This commit is contained in:
neverland
2018-07-13 15:40:23 +08:00
committed by GitHub
parent 6977cf8a80
commit 13f7a5d57f
2 changed files with 11 additions and 20 deletions

View File

@@ -80,17 +80,11 @@ test('only allow interger', () => {
}
});
const fn = jest.fn();
wrapper.vm.onKeypress({
keyCode: 46,
preventDefault: fn
});
wrapper.vm.onKeypress({
keyCode: 45,
preventDefault: fn
});
const input = wrapper.find('input');
input.element.value = '1.2';
input.trigger('input');
expect(fn.mock.calls.length).toEqual(1);
expect(wrapper.emitted('input')).toEqual([[1]]);
});
test('stepper blur', () => {