2
0
mirror of https://github.com/tenrok/maska.git synced 2026-06-11 18:02:27 +03:00

fix: correct check for NaN #228

This commit is contained in:
Alexander Shabunevich
2024-08-26 21:22:47 +03:00
parent f5ec443c76
commit 1a885ce41d
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -166,3 +166,11 @@ test('initial brazilian number', () => {
expect(mask.masked('1.23')).toBe('123')
expect(mask.masked('1,23')).toBe('1,23')
})
// https://github.com/beholdr/maska/issues/228
test('NaN check', () => {
const mask = new Mask({ number: { locale: 'uk', fraction: 2 } })
expect(mask.masked('.')).toBe('')
expect(mask.masked(',')).toBe('')
})