@@ -123,7 +123,7 @@ define([
123
123
expect ( dom . listNext ( $i [ 0 ] ) ) . to . deep . equal ( [ $i [ 0 ] ] ) ;
124
124
} ) ;
125
125
126
- it ( 'should restun an array of next sibling elements before predicate is true' , function ( ) {
126
+ it ( 'should return an array of next sibling elements before predicate is true' , function ( ) {
127
127
expect ( dom . listNext ( $s [ 0 ] , func . eq ( $i [ 0 ] ) ) ) . to . deep . equal ( [ $s [ 0 ] ] ) ;
128
128
} ) ;
129
129
} ) ;
@@ -161,7 +161,7 @@ define([
161
161
$i = $cont . find ( 'i' ) ;
162
162
} ) ;
163
163
164
- it ( 'should return the positon of element' , function ( ) {
164
+ it ( 'should return the position of element' , function ( ) {
165
165
expect ( dom . position ( $b [ 0 ] ) ) . to . be . equal ( 0 ) ;
166
166
expect ( dom . position ( $u [ 0 ] ) ) . to . be . equal ( 1 ) ;
167
167
expect ( dom . position ( $s [ 0 ] ) ) . to . be . equal ( 2 ) ;
@@ -237,31 +237,31 @@ define([
237
237
} ) ;
238
238
239
239
describe ( 'element pivot case' , function ( ) {
240
- it ( 'should be splited by u tag with offset 0' , function ( ) {
240
+ it ( 'should be split by u tag with offset 0' , function ( ) {
241
241
var $u = $para . find ( 'u' ) ;
242
242
dom . splitTree ( $para [ 0 ] , { node : $u [ 0 ] , offset : 0 } ) ;
243
243
244
244
helper . equalsToUpperCase ( $para . html ( ) , '<b>b</b><u><br></u>' , expect ) ;
245
245
helper . equalsToUpperCase ( $para . next ( ) . html ( ) , '<u>u</u><s>strike</s><i>i</i>' , expect ) ; // right hand side
246
246
} ) ;
247
247
248
- it ( 'should be splited by u tag with offset 1' , function ( ) {
248
+ it ( 'should be split by u tag with offset 1' , function ( ) {
249
249
var $u = $para . find ( 'u' ) ;
250
250
dom . splitTree ( $para [ 0 ] , { node : $u [ 0 ] , offset : 1 } ) ;
251
251
252
252
helper . equalsToUpperCase ( $para . html ( ) , '<b>b</b><u>u</u>' , expect ) ;
253
253
helper . equalsToUpperCase ( $para . next ( ) . html ( ) , '<u><br></u><s>strike</s><i>i</i>' , expect ) ; // right hand side
254
254
} ) ;
255
255
256
- it ( 'should be splited by b tag with offset 0 (left edge case)' , function ( ) {
256
+ it ( 'should be split by b tag with offset 0 (left edge case)' , function ( ) {
257
257
var $b = $para . find ( 'b' ) ;
258
258
dom . splitTree ( $para [ 0 ] , { node : $b [ 0 ] , offset : 0 } ) ;
259
259
260
260
helper . equalsToUpperCase ( $para . html ( ) , '<b><br></b>' , expect ) ;
261
261
helper . equalsToUpperCase ( $para . next ( ) . html ( ) , '<b>b</b><u>u</u><s>strike</s><i>i</i>' , expect ) ; // right hand side
262
262
} ) ;
263
263
264
- it ( 'should be splited by i tag with offset 1 (right edge case)' , function ( ) {
264
+ it ( 'should be split by i tag with offset 1 (right edge case)' , function ( ) {
265
265
var $i = $para . find ( 'i' ) ;
266
266
dom . splitTree ( $para [ 0 ] , { node : $i [ 0 ] , offset : 1 } ) ;
267
267
@@ -271,45 +271,45 @@ define([
271
271
} ) ;
272
272
273
273
describe ( 'textNode case' , function ( ) {
274
- it ( 'should be splited by s tag with offset 3 (middle case)' , function ( ) {
274
+ it ( 'should be split by s tag with offset 3 (middle case)' , function ( ) {
275
275
var $s = $para . find ( 's' ) ;
276
276
dom . splitTree ( $para [ 0 ] , { node : $s [ 0 ] . firstChild , offset : 3 } ) ;
277
277
278
278
helper . equalsToUpperCase ( $para . html ( ) , '<b>b</b><u>u</u><s>str</s>' , expect ) ;
279
279
helper . equalsToUpperCase ( $para . next ( ) . html ( ) , '<s>ike</s><i>i</i>' , expect ) ; // right hand side
280
280
} ) ;
281
281
282
- it ( 'should be splited by s tag with offset 0 (left edge case)' , function ( ) {
282
+ it ( 'should be split by s tag with offset 0 (left edge case)' , function ( ) {
283
283
var $s = $para . find ( 's' ) ;
284
284
dom . splitTree ( $para [ 0 ] , { node : $s [ 0 ] . firstChild , offset : 0 } ) ;
285
285
286
286
helper . equalsToUpperCase ( $para . html ( ) , '<b>b</b><u>u</u><s><br></s>' , expect ) ;
287
287
helper . equalsToUpperCase ( $para . next ( ) . html ( ) , '<s>strike</s><i>i</i>' , expect ) ; // right hand side
288
288
} ) ;
289
289
290
- it ( 'should be splited by s tag with offset 6 (right edge case)' , function ( ) {
290
+ it ( 'should be split by s tag with offset 6 (right edge case)' , function ( ) {
291
291
var $s = $para . find ( 's' ) ;
292
292
dom . splitTree ( $para [ 0 ] , { node : $s [ 0 ] . firstChild , offset : 6 } ) ;
293
293
294
294
helper . equalsToUpperCase ( $para . html ( ) , '<b>b</b><u>u</u><s>strike</s>' , expect ) ;
295
295
helper . equalsToUpperCase ( $para . next ( ) . html ( ) , '<s><br></s><i>i</i>' , expect ) ; // right hand side
296
296
} ) ;
297
297
298
- it ( 'should be splited by s tag with offset 3 (2 depth case)' , function ( ) {
298
+ it ( 'should be split by s tag with offset 3 (2 depth case)' , function ( ) {
299
299
var $s = $para . find ( 's' ) ;
300
300
dom . splitTree ( $s [ 0 ] , { node : $s [ 0 ] . firstChild , offset : 3 } ) ;
301
301
302
302
helper . equalsToUpperCase ( $para . html ( ) , '<b>b</b><u>u</u><s>str</s><s>ike</s><i>i</i>' , expect ) ;
303
303
} ) ;
304
304
305
- it ( 'should be splited by s tag with offset 3 (1 depth and textNode case)' , function ( ) {
305
+ it ( 'should be split by s tag with offset 3 (1 depth and textNode case)' , function ( ) {
306
306
var $s = $para . find ( 's' ) ;
307
307
dom . splitTree ( $s [ 0 ] . firstChild , { node : $s [ 0 ] . firstChild , offset : 3 } ) ;
308
308
309
309
helper . equalsToUpperCase ( $para . html ( ) , '<b>b</b><u>u</u><s>strike</s><i>i</i>' , expect ) ;
310
310
} ) ;
311
311
312
- it ( 'should be splited by span tag with offset 2 (1 depth and element case)' , function ( ) {
312
+ it ( 'should be split by span tag with offset 2 (1 depth and element case)' , function ( ) {
313
313
var $cont = $ ( '<div class="note-editable"><p><span><b>b</b><u>u</u><s>s</s><i>i</i></span></p></div>' ) ; //busi
314
314
var $span = $cont . find ( 'span' ) ;
315
315
dom . splitTree ( $span [ 0 ] , { node : $span [ 0 ] , offset : 2 } ) ;
@@ -320,7 +320,7 @@ define([
320
320
} ) ;
321
321
322
322
describe ( 'splitPoint' , function ( ) {
323
- it ( 'should retun rightNode and container for empty paragraph with inline' , function ( ) {
323
+ it ( 'should return rightNode and container for empty paragraph with inline' , function ( ) {
324
324
var $editable = $ ( '<div class="note-editable"><p><br></p></div>' ) ;
325
325
var $para = $editable . clone ( ) . find ( 'p' ) ;
326
326
var $br = $para . find ( 'br' ) ;
0 commit comments