mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
fix
This commit is contained in:
@@ -107,6 +107,26 @@ kit.ready(['collection'], function () {
|
||||
}), undefined, 'first');
|
||||
|
||||
assertSame(collection.keys().count(), 3, 'keys');
|
||||
|
||||
|
||||
x = new kit.Collection({1: 1, 100: 100});
|
||||
x.push(200);
|
||||
assertSame(x.last(), 200, 'object push last');
|
||||
x.push(0);
|
||||
assertSame(x.last(), 0, 'object push last');
|
||||
x.push(undefined);
|
||||
assertSame(x.last(), undefined, 'object push last');
|
||||
x.push('window');
|
||||
assertSame(x.last(), 'window', 'object push last');
|
||||
assertSame(x.get(x.lastKey()), 'window', 'get lastKey');
|
||||
|
||||
x = new kit.Collection([1, 100]);
|
||||
x.push(200);
|
||||
assertSame(x.last(), 200, 'array push last');
|
||||
x.push(0);
|
||||
assertSame(x.last(), 0, 'array push last');
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user