Index: trunk/parsers/wikidom/tests/hype/test.js |
— | — | @@ -25,4 +25,20 @@ |
26 | 26 | modelList.splice( 1, 0, modelItem3 ); |
27 | 27 | equal( updates, 3, 'es.modelList emits update events on splice' ); |
28 | 28 | equal( modelList[1], modelItem3, 'es.modelList inserts item on splice' ); |
| 29 | + |
| 30 | + modelList.pop(); |
| 31 | + equal( updates, 4, 'es.modelList emits update events on pop' ); |
| 32 | + deepEqual( |
| 33 | + modelList.slice( 0 ), |
| 34 | + [modelItem2, modelItem3], |
| 35 | + 'es.modelList removes last item on pop' |
| 36 | + ); |
| 37 | + |
| 38 | + modelList.shift(); |
| 39 | + equal( updates, 5, 'es.modelList emits update events on shift' ); |
| 40 | + deepEqual( |
| 41 | + modelList.slice( 0 ), |
| 42 | + [modelItem3], |
| 43 | + 'es.modelList removes first item on shift' |
| 44 | + ); |
29 | 45 | } ); |