feat(strict mode): adding strict mode flag to all js files

the flag must be in all src and test files so that we get the benefit of
running in the strict mode even in jstd

the following script was used to modify all files:

for file in `find src test -name "*.js"`; do
  echo -e "'use strict';\n" > temp.txt
  cat $file >> temp.txt
  mv temp.txt $file
done
This commit is contained in:
Igor Minar
2011-07-17 01:05:43 -07:00
parent b98c23274b
commit fe5240732d
108 changed files with 216 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
'use strict';
describe('angular', function(){
describe('case', function(){
it('should change case', function(){

View File

@@ -1,3 +1,5 @@
'use strict';
describe('api', function(){
describe('HashMap', function(){

View File

@@ -1,3 +1,5 @@
'use strict';
describe('Binder', function(){
beforeEach(function(){

View File

@@ -1,3 +1,5 @@
'use strict';
describe('browser', function(){
var browser, fakeWindow, xhr, logs, scripts, removedScripts, setTimeoutQueue;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('compiler', function(){
var compiler, markup, attrMarkup, directives, widgets, compile, log, scope;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('filter', function() {
var filter = angular.filter;

View File

@@ -1,3 +1,5 @@
'use strict';
describe("formatter", function(){
it('should noop', function(){
assertEquals("abc", angular.formatter.noop.format("abc"));

View File

@@ -1,3 +1,5 @@
'use strict';
describe('injector', function(){
var providers;
var cache;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('json', function(){
it('should serialize primitives', function() {
expect(toJson(0/0)).toEqual('null');

View File

@@ -1,3 +1,5 @@
'use strict';
describe('parser', function() {
describe('lexer', function() {
it('should tokenize a string', function() {

View File

@@ -1,3 +1,5 @@
'use strict';
describe("resource", function() {
var xhr, resource, CreditCard, callback;

View File

@@ -1,3 +1,5 @@
'use strict';
describe("ScenarioSpec: Compilation", function(){
var scope;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('scope/model', function(){
var temp;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('ValidatorTest', function(){
it('ShouldHaveThisSet', function() {

View File

@@ -1,3 +1,5 @@
'use strict';
describe('mocks', function(){
describe('TzDate', function() {

View File

@@ -1,3 +1,5 @@
'use strict';
describe("directive", function(){
var compile, model, element;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('jqLite', function(){
var scope, a, b, c;

View File

@@ -1 +1,3 @@
'use strict';
var _jQuery = jQuery;

View File

@@ -1 +1,3 @@
'use strict';
var _jQuery = jQuery.noConflict(true);

View File

@@ -1,3 +1,5 @@
'use strict';
describe('jstd-adapter', function() {
var fakeJSTD = { pluginRegistrar: { register: function() {} } },
originalNavigateTo = angular.scenario.Application.prototype.navigateTo;

View File

@@ -1,3 +1,5 @@
'use strict';
describe("markups", function(){
var compile, element, scope;

View File

@@ -1,3 +1,5 @@
'use strict';
/**
* Mock implementation of {@link angular.service.$log} that gathers all logged messages in arrays
* (one array per logging level). These arrays are exposed as `logs` property of each of the

View File

@@ -1,3 +1,5 @@
'use strict';
describe('HTML', function(){
function expectHTML(html) {

View File

@@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.Application', function() {
var $window;
var app, frames;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.Describe', function() {
var log;
var root;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.Future', function() {
var future;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.ObjectModel', function() {
var model;
var runner;

View File

@@ -1,3 +1,5 @@
'use strict';
/**
* Mock spec runner.
*/

View File

@@ -1,3 +1,5 @@
'use strict';
/**
* Mock Application
*/

View File

@@ -1,3 +1,5 @@
'use strict';
describe("angular.scenario.dsl", function() {
var $window, $root;
var application, eventLog;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('widgets', function() {
it('should verify that basic widgets work', function(){
browser().navigateTo('widgets.html');

View File

@@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.matchers', function () {
var matchers;

View File

@@ -1,3 +1,5 @@
'use strict';
angular.scenario.testing = angular.scenario.testing || {};
angular.scenario.testing.MockAngular = function() {

View File

@@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.output.html', function() {
var runner, model, spec, step, listeners, ui, context;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.output.json', function() {
var output, context;
var runner, model, $window;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.output.object', function() {
var output;
var runner, model, $window;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('angular.scenario.output.json', function() {
var output, context;
var runner, model, $window;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('$cookieStore', function() {
var scope, $browser, $cookieStore;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('$cookies', function() {
var scope, $browser;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('$defer', function() {
var scope, $browser, $defer, $exceptionHandler;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('$document', function() {
var scope;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('$exceptionHandler', function() {
var scope;

View File

@@ -1 +1,3 @@
'use strict';

View File

@@ -1,3 +1,5 @@
'use strict';
describe('$invalidWidgets', function() {
var scope;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('$location', function() {
var scope, $location, $browser;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('$log', function() {
var scope;

View File

@@ -1 +1,3 @@
'use strict';

View File

@@ -1,3 +1,5 @@
'use strict';
describe('$route', function() {
var scope;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('$updateView', function() {
var scope, browser, evalCount, $updateView;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('$window', function() {
var scope;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('$xhr.bulk', function() {
var scope, $browser, $browserXhr, $log, $xhrBulk, $xhrError, log;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('$xhr.cache', function() {
var scope, $browser, $browserXhr, cache, log;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('$xhr.error', function() {
var scope, $browser, $browserXhr, $xhr, $xhrError, log;

View File

@@ -1,3 +1,5 @@
'use strict';
describe('$xhr', function() {
var scope, $browser, $browserXhr, $log, $xhr, log;

View File

@@ -1,3 +1,5 @@
'use strict';
/**
* Here is the problem: http://bugs.jquery.com/ticket/7292
* basically jQuery treats change event on some browsers (IE) as a

View File

@@ -1,3 +1,5 @@
'use strict';
describe("widget", function(){
var compile, element, scope;