mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-05 13:44:42 +00:00
style(rootScopeSpec): add semi-colons
This commit is contained in:
parent
2977067726
commit
ac72bee400
1 changed files with 7 additions and 7 deletions
|
|
@ -287,16 +287,16 @@ describe('Scope', function() {
|
||||||
it('should watch functions', function() {
|
it('should watch functions', function() {
|
||||||
module(provideLog);
|
module(provideLog);
|
||||||
inject(function($rootScope, log) {
|
inject(function($rootScope, log) {
|
||||||
$rootScope.fn = function() {return 'a'};
|
$rootScope.fn = function() {return 'a';};
|
||||||
$rootScope.$watch('fn', function(fn) {
|
$rootScope.$watch('fn', function(fn) {
|
||||||
log(fn());
|
log(fn());
|
||||||
});
|
});
|
||||||
$rootScope.$digest();
|
$rootScope.$digest();
|
||||||
expect(log).toEqual('a');
|
expect(log).toEqual('a');
|
||||||
$rootScope.fn = function() {return 'b'};
|
$rootScope.fn = function() {return 'b';};
|
||||||
$rootScope.$digest();
|
$rootScope.$digest();
|
||||||
expect(log).toEqual('a; b');
|
expect(log).toEqual('a; b');
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -488,7 +488,7 @@ describe('Scope', function() {
|
||||||
$rootScope.$digest();
|
$rootScope.$digest();
|
||||||
expect(log).toEqual([ '["b",[],{}]', '["b",{},[]]' ]);
|
expect(log).toEqual([ '["b",[],{}]', '["b",{},[]]' ]);
|
||||||
|
|
||||||
$rootScope.obj.shift()
|
$rootScope.obj.shift();
|
||||||
log = [];
|
log = [];
|
||||||
$rootScope.$digest();
|
$rootScope.$digest();
|
||||||
expect(log).toEqual([ '[{},[]]' ]);
|
expect(log).toEqual([ '[{},[]]' ]);
|
||||||
|
|
@ -499,14 +499,14 @@ describe('Scope', function() {
|
||||||
$rootScope.$watchCollection('arrayLikeObject', function logger(obj) {
|
$rootScope.$watchCollection('arrayLikeObject', function logger(obj) {
|
||||||
forEach(obj, function (element){
|
forEach(obj, function (element){
|
||||||
arrayLikelog.push(element.name);
|
arrayLikelog.push(element.name);
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
document.body.innerHTML = "<p>" +
|
document.body.innerHTML = "<p>" +
|
||||||
"<a name='x'>a</a>" +
|
"<a name='x'>a</a>" +
|
||||||
"<a name='y'>b</a>" +
|
"<a name='y'>b</a>" +
|
||||||
"</p>";
|
"</p>";
|
||||||
|
|
||||||
$rootScope.arrayLikeObject = document.getElementsByTagName('a')
|
$rootScope.arrayLikeObject = document.getElementsByTagName('a');
|
||||||
$rootScope.$digest();
|
$rootScope.$digest();
|
||||||
expect(arrayLikelog).toEqual(['x', 'y']);
|
expect(arrayLikelog).toEqual(['x', 'y']);
|
||||||
});
|
});
|
||||||
|
|
@ -565,7 +565,7 @@ describe('Scope', function() {
|
||||||
log = [];
|
log = [];
|
||||||
$rootScope.$digest();
|
$rootScope.$digest();
|
||||||
expect(log).toEqual([ '{"b":[],"c":"B"}' ]);
|
expect(log).toEqual([ '{"b":[],"c":"B"}' ]);
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue