We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d02aeaf commit abf988cCopy full SHA for abf988c
tests/cypress/integration/plugins/mask.spec.js
@@ -89,6 +89,21 @@ test('x-mask with x-model with initial value',
89
},
90
)
91
92
+test('x-mask with x-model if initial value is null it should remain null',
93
+ [html`
94
+ <div x-data="{ value: null }">
95
+ <input x-mask="(999) 999-9999" x-model="value" id="1">
96
+ <input id="2" x-model="value">
97
+ <span id="3" x-text="value === null ? 'NULL' : value"></span>
98
+ </div>
99
+ `],
100
+ ({ get }) => {
101
+ get('#1').should(haveValue(''))
102
+ get('#2').should(haveValue(''))
103
+ get('#3').contains('NULL')
104
+ },
105
+)
106
+
107
test('x-mask with a falsy input',
108
[html`<input x-data x-mask="">`],
109
({ get }) => {
0 commit comments