mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
23 lines
478 B
JavaScript
23 lines
478 B
JavaScript
|
|
nglrTest = TestCase('nglrTest');
|
||
|
|
|
||
|
|
nglrTest.prototype.testShiftBind = function(){
|
||
|
|
expectAsserts(3);
|
||
|
|
nglr.shiftBind('this', function(target, arg) {
|
||
|
|
assertEquals(this, 'this');
|
||
|
|
assertEquals(target, 'target');
|
||
|
|
assertEquals(arg, 'arg');
|
||
|
|
}).apply('target', ['arg']);
|
||
|
|
};
|
||
|
|
|
||
|
|
nglrTest.prototype.testBind = function(){
|
||
|
|
expectAsserts(2);
|
||
|
|
nglr.bind('this', function(arg) {
|
||
|
|
assertEquals(this, 'this');
|
||
|
|
assertEquals(arg, 'arg');
|
||
|
|
}).apply('XXX', ['arg']);
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|