2
0
mirror of https://github.com/tenrok/maska.git synced 2026-06-05 16:42:28 +03:00

Fix alpinejs test

This commit is contained in:
Alexey Vasiliev
2024-11-19 22:21:20 +02:00
parent 52797e46a2
commit 52eb516719
+3 -3
View File
@@ -122,7 +122,7 @@ describe('bindings', () => {
input = await prepareInput(
`<div x-data="{ iscompleted: false }">
<input x-maska:iscompleted.completed data-maska="#-#">
<span x-show="iscompleted"></span>
<span x-text="\`Completed: \${iscompleted ? 'yes' : 'no'}\`"></span>
</div>`
)
const span = <HTMLSpanElement>document.querySelector('span')
@@ -130,12 +130,12 @@ describe('bindings', () => {
await user.type(input, '1')
expect(input).toHaveValue('1')
expect(span).not.toBeVisible()
expect(span).toHaveTextContent('Completed: no')
await user.type(input, '2')
expect(input).toHaveValue('1-2')
expect(span).toBeVisible()
expect(span).toHaveTextContent('Completed: yes')
})
test('bind masked with onMask', async () => {