aboutsummaryrefslogtreecommitdiffstats
path: root/test/service/logSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2011-03-23 09:33:29 -0700
committerVojta Jina2011-08-02 01:00:03 +0200
commit8f0dcbab804180828d6859b1340c86cf161209fb (patch)
treed13d47d47a1889cb7c96a87cecacd2e25307d51c /test/service/logSpec.js
parent1f4b417184ce53af15474de065400f8a686430c5 (diff)
downloadangular.js-8f0dcbab804180828d6859b1340c86cf161209fb.tar.bz2
feat(scope): new and improved scope implementation
- Speed improvements (about 4x on flush phase) - Memory improvements (uses no function closures) - Break $eval into $apply, $dispatch, $flush - Introduced $watch and $observe Breaks angular.equals() use === instead of == Breaks angular.scope() does not take parent as first argument Breaks scope.$watch() takes scope as first argument Breaks scope.$set(), scope.$get are removed Breaks scope.$config is removed Breaks $route.onChange callback has not "this" bounded
Diffstat (limited to 'test/service/logSpec.js')
-rw-r--r--test/service/logSpec.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/service/logSpec.js b/test/service/logSpec.js
index 80d085b8..499447ad 100644
--- a/test/service/logSpec.js
+++ b/test/service/logSpec.js
@@ -19,12 +19,12 @@ describe('$log', function() {
function warn(){ logger+= 'warn;'; }
function info(){ logger+= 'info;'; }
function error(){ logger+= 'error;'; }
- var scope = createScope({}, {$log: $logFactory},
- {$exceptionHandler: rethrow,
- $window: {console: {log: log,
- warn: warn,
- info: info,
- error: error}}}),
+ var scope = createScope({$log: $logFactory},
+ {$exceptionHandler: rethrow,
+ $window: {console: {log: log,
+ warn: warn,
+ info: info,
+ error: error}}}),
$log = scope.$service('$log');
$log.log();
@@ -38,9 +38,9 @@ describe('$log', function() {
it('should use console.log() if other not present', function(){
var logger = "";
function log(){ logger+= 'log;'; }
- var scope = createScope({}, {$log: $logFactory},
- {$window: {console:{log:log}},
- $exceptionHandler: rethrow});
+ var scope = createScope({$log: $logFactory},
+ {$window: {console:{log:log}},
+ $exceptionHandler: rethrow});
var $log = scope.$service('$log');
$log.log();
$log.warn();
@@ -51,9 +51,9 @@ describe('$log', function() {
it('should use noop if no console', function(){
- var scope = createScope({}, {$log: $logFactory},
- {$window: {},
- $exceptionHandler: rethrow}),
+ var scope = createScope({$log: $logFactory},
+ {$window: {},
+ $exceptionHandler: rethrow}),
$log = scope.$service('$log');
$log.log();
$log.warn();