tests_option.js 540 B

123456789101112131415
  1. export default function (qunit, $, Inputmask) {
  2. qunit.module("Extra options after masking");
  3. qunit.test("decimal alias add suffix later - gkostov", function (assert) {
  4. var $fixture = $("#qunit-fixture");
  5. $fixture.append('<input type="text" id="testmask" />');
  6. var testmask = document.getElementById("testmask");
  7. Inputmask({alias: "decimal", suffix: ""}).mask("testmask");
  8. testmask.inputmask.option({suffix: "%"});
  9. $("#testmask").Type("123.45");
  10. assert.equal(testmask.value, "123.45%", "Result " + testmask.value);
  11. });
  12. };