fix bug comma

This commit is contained in:
2020-07-12 15:04:12 +07:00
parent e132f3b5c9
commit c27b800795
66 changed files with 15559 additions and 16 deletions

View File

@@ -0,0 +1,31 @@
"use strict";
module("change");
test("it calls the change event when the field's value is changed", function() {
var input = $("#input1").maskMoney(),
changeWasCalled = false;
input.change(function() {
changeWasCalled = true;
});
input.val("0.01");
input.trigger("focus");
keypress(input, 1);
input.trigger("blur");
ok(changeWasCalled, "change was called");
equal(input.val(), "0.11", "changed value");
});
test("it doesn't call the change event when the field's value is unchanged", function() {
var input = $("#input1").maskMoney(),
changeWasCalled = false;
input.change(function() {
changeWasCalled = true;
});
input.val("0.01");
input.trigger("focus");
input.trigger("blur");
ok(!changeWasCalled, "change was not called");
equal(input.val(), "0.01", "changed value");
});