Skip to content

Commit 6efbdbf

Browse files
committed
Mask: Update unit tests to use namespaced data property
1 parent 4f5a83c commit 6efbdbf

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

tests/unit/mask/mask_core.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ test( "_caret() can move and read the text cursor", 4, function() {
1717
var input = $( "#mask1" ).val("1234").mask({
1818
mask: "9999"
1919
}),
20-
instance = input.data( "mask" );
20+
instance = input.data( "ui-mask" );
2121

2222
input.focus();
2323
instance._caret( 0 );
@@ -102,7 +102,7 @@ test( "Default values provided by function", function() {
102102
definitions: defs
103103
});
104104
equal( input.val(), "11", "No value was accepted, so the 'default' from the mask was provided" );
105-
105+
106106
});
107107

108108
}( jQuery ) );

tests/unit/mask/mask_events.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ test( "focus: Initial Caret Positioning", 4, function() {
77
mask: "9",
88
clearEmpty: false
99
}),
10-
mask = input.data( "mask" );
10+
mask = input.data( "ui-mask" );
1111

1212
equal( input.val(), "_", "Initial Value Expected" );
1313
TestHelpers.focus( input );
@@ -24,7 +24,7 @@ test( "focus: Initial Caret Positioning", 4, function() {
2424
test( "keydown: Backspace pulls values from right", function() {
2525
expect( 12 );
2626
var input = $( "#mask1" ).val("123").mask({ mask: "999" }),
27-
mask = input.data( "mask" );
27+
mask = input.data( "ui-mask" );
2828

2929

3030
TestHelpers.focus( input );
@@ -64,7 +64,7 @@ test( "keydown: Backspace pulls values from right", function() {
6464
test( "keydown: Backspace with the cursor to the right of a mask literal", function() {
6565
expect( 6 );
6666
var input = $( "#mask1" ).val("123").mask({ mask: "9-99" }),
67-
mask = input.data( "mask" );
67+
mask = input.data( "ui-mask" );
6868

6969
TestHelpers.focus( input );
7070
equal( input.val(), "1-23", "Initial Value Expected" );
@@ -86,7 +86,7 @@ test( "keydown: Backspace with the cursor to the right of a mask literal", funct
8686
test( "keydown: Backspace with multiple values higlighted", function() {
8787
expect( 3 );
8888
var input = $( "#mask1" ).val("1234567890").mask({ mask: "(999)999-9999" }),
89-
mask = input.data( "mask" );
89+
mask = input.data( "ui-mask" );
9090

9191
TestHelpers.focus( input );
9292
equal( input.val(), "(123)456-7890", "Initial Value Expected" );
@@ -100,7 +100,7 @@ test( "keydown: Backspace with multiple values higlighted", function() {
100100
test( "keypress: Typing with multiple values higlighted", function() {
101101
expect( 3 );
102102
var input = $( "#mask1" ).val("1234567890").mask({ mask: "(999)999-9999" }),
103-
mask = input.data( "mask" );
103+
mask = input.data( "ui-mask" );
104104

105105
TestHelpers.focus( input );
106106
equal( input.val(), "(123)456-7890", "Initial Value Expected" );
@@ -121,7 +121,7 @@ test( "keypress: Typing with multi-character fields", function() {
121121
}
122122
}
123123
}),
124-
mask = input.data( "mask" );
124+
mask = input.data( "ui-mask" );
125125

126126
TestHelpers.focus( input );
127127
equal( input.val(), "__-__-__", "Initial Value Expected" );
@@ -156,7 +156,7 @@ test( "keypress: Typing with multi-character only accepts valid values", functio
156156
}
157157
}
158158
}),
159-
mask = input.data( "mask" );
159+
mask = input.data( "ui-mask" );
160160

161161
TestHelpers.focus( input );
162162
equal( input.val(), "__-__-__", "Initial Value Expected" );
@@ -204,7 +204,7 @@ test( "keypress: Backspace with multi-character ", 6, function() {
204204
}
205205
}
206206
}),
207-
mask = input.data( "mask" );
207+
mask = input.data( "ui-mask" );
208208

209209
TestHelpers.focus( input );
210210
equal( input.val(), "aa-bb-cc", "Initial Value Expected" );
@@ -225,7 +225,7 @@ test( "keypress: Backspace with multi-character ", 6, function() {
225225
test( "keydown: Delete pulling values", function() {
226226
expect( 18 );
227227
var input = $( "#mask1" ).val("123").mask({ mask: "9-99" }),
228-
mask = input.data( "mask" );
228+
mask = input.data( "ui-mask" );
229229

230230
TestHelpers.focus( input );
231231
equal( input.val(), "1-23", "Initial value expected" );
@@ -280,7 +280,7 @@ test( "keydown: Delete pulling values", function() {
280280
test( "keydown: escape returns to original value", function() {
281281
expect( 3 );
282282
var input = $( "#mask1" ).val("6").mask({ mask: "9" }),
283-
mask = input.data( "mask" );
283+
mask = input.data( "ui-mask" );
284284

285285
equal( input.val(), "6", "Initial value expected" );
286286
TestHelpers.focus( input );
@@ -300,7 +300,7 @@ test( "keypress: typing behaviors", function() {
300300
mask: "9-9",
301301
clearEmpty: false
302302
}),
303-
mask = input.data( "mask" );
303+
mask = input.data( "ui-mask" );
304304

305305
TestHelpers.focus( input );
306306
equal( input.val(), "_-_", "Initial value expected" );

tests/unit/mask/mask_options.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ test( "mask option parser", 1, function() {
134134
mask: "hh:ss:ss.999",
135135
definitions: defs
136136
}),
137-
instance = input.data( "mask" );
137+
instance = input.data( "ui-mask" );
138138
deepEqual( instance.buffer, [
139139
{
140140
valid: defs.hh,

0 commit comments

Comments
 (0)