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:
@@ -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('')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user