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

Revert "allow custom escape character"

This reverts commit e078efd695.
This commit is contained in:
Alexander Shabunevich
2023-04-21 14:27:47 +03:00
parent 593c111acb
commit f73c21b5fa
4 changed files with 2 additions and 53 deletions
-36
View File
@@ -1449,42 +1449,6 @@ describe("Optional with multiple '-9' mask", () => {
})
})
describe("Custom escape with '$#!99' mask", () => {
beforeAll(() => {
input = prepareInput({
mask: '$#!99',
tokens: {
'$': { pattern: /\$/, escape: true },
'9': { pattern: /\d/, multiple: true }
},
})
})
afterEach(async () => {
await user.clear(input)
})
test('input { }', async () => {
await user.type(input, '{ }')
expect(input).toHaveValue('#9')
})
test('input 1', async () => {
await user.type(input, '1')
expect(input).toHaveValue('#91')
})
test('input 91', async () => {
await user.type(input, '91')
expect(input).toHaveValue('#91')
})
test('input 1234', async () => {
await user.type(input, '1234')
expect(input).toHaveValue('#91234')
})
})
describe('IP mask', () => {
beforeAll(() => {
input = prepareInput({