Skip to content

Commit

Permalink
add cursor test
Browse files Browse the repository at this point in the history
  • Loading branch information
uNmAnNeR committed Aug 14, 2019
1 parent 3c5a349 commit 30470d6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/imask/test/masked/pattern/cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@ describe('Align NONE', function () {
assert.equal(masked.nearestInputPos(1, DIRECTION.NONE), 1);
});

it('should align before input', function () {
masked.updateOptions({
mask: '0.0',
});

masked.value = '1.';
assert.equal(masked.nearestInputPos(2, DIRECTION.NONE), 2);
});

it('should align before last fixed', function () {
masked.updateOptions({
mask: '0.',
Expand Down

0 comments on commit 30470d6

Please sign in to comment.