fix(facades): fix splice semantics; add test

This commit is contained in:
Yegor Jbanov
2015-04-17 13:20:03 -07:00
parent 2b4d30d931
commit 526c51d1a6
5 changed files with 24 additions and 4 deletions
+16
View File
@@ -0,0 +1,16 @@
import {describe, it, expect, beforeEach, ddescribe, iit, xit}
from 'angular2/test_lib';
import {List, ListWrapper} from 'angular2/src/facade/collection';
export function main() {
describe('ListWrapper', () => {
describe('splice', () => {
it('should remove sublist of given length and return it', () => {
var list = [1, 2, 3, 4, 5, 6];
expect(ListWrapper.splice(list, 1, 3)).toEqual([2, 3, 4]);
expect(list).toEqual([1, 5, 6]);
});
});
});
}