Skip to content

Commit

Permalink
add test for #931
Browse files Browse the repository at this point in the history
  • Loading branch information
uNmAnNeR committed Dec 15, 2023
1 parent 61f2f15 commit 276833d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/imask/test/masked/base.ts
Expand Up @@ -188,4 +188,16 @@ describe('Masked', function () {
assert.strictEqual(masked.value, '0');
});
});

describe('#withValueRefresh', function () {
it('should commit after adding tail', function () {
const masked = new MaskedNumber({ scale: 2, normalizeZeros: false, padFractionalZeros: true });

masked.unmaskedValue = '11.00';
assert.strictEqual(masked.value, '11,00');

masked.updateOptions({ normalizeZeros: true, padFractionalZeros: false });
assert.strictEqual(masked.value, '11');
});
});
});

0 comments on commit 276833d

Please sign in to comment.