Skip to content

Commit 0f89383

Browse files
committed
chore(tests): rename all directive names to the normalized form
1 parent 10daefc commit 0f89383

22 files changed

+58
-58
lines changed

test/AngularSpec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,15 +345,15 @@ describe('angular', function() {
345345
});
346346

347347

348-
it('should look for ng-app directive in id', function() {
348+
it('should look for ngApp directive in id', function() {
349349
var appElement = jqLite('<div id="ng-app" data-ng-app="ABC"></div>')[0];
350350
jqLite(document.body).append(appElement);
351351
angularInit(element, bootstrap);
352352
expect(bootstrap).toHaveBeenCalledOnceWith(appElement, ['ABC']);
353353
});
354354

355355

356-
it('should look for ng-app directive in className', function() {
356+
it('should look for ngApp directive in className', function() {
357357
var appElement = jqLite('<div data-ng-app="ABC"></div>')[0];
358358
element.querySelectorAll = function(arg) { return element.querySelectorAll[arg] || []; }
359359
element.querySelectorAll['.ng\\:app'] = [appElement];
@@ -362,7 +362,7 @@ describe('angular', function() {
362362
});
363363

364364

365-
it('should look for ng-app directive using querySelectorAll', function() {
365+
it('should look for ngApp directive using querySelectorAll', function() {
366366
var appElement = jqLite('<div x-ng-app="ABC"></div>')[0];
367367
element.querySelectorAll = function(arg) { return element.querySelectorAll[arg] || []; }
368368
element.querySelectorAll['[ng\\:app]'] = [ appElement ];

test/ng/compilerSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ describe('$compile', function() {
470470
}));
471471

472472

473-
it('should merge interpolated css class with ng-repeat',
473+
it('should merge interpolated css class with ngRepeat',
474474
inject(function($compile, $rootScope) {
475475
element = $compile(
476476
'<div>' +

test/ng/directive/booleanAttrsSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ describe('boolean attr directives', function() {
7777
});
7878

7979

80-
describe('ng-src', function() {
80+
describe('ngSrc', function() {
8181

8282
it('should interpolate the expression and bind to src', inject(function($compile, $rootScope) {
8383
var element = $compile('<div ng-src="some/{{id}}"></div>')($rootScope)
@@ -94,7 +94,7 @@ describe('ng-src', function() {
9494
});
9595

9696

97-
describe('ng-href', function() {
97+
describe('ngHref', function() {
9898
var element;
9999

100100
afterEach(function() {

test/ng/directive/formSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('form', function() {
5353
});
5454

5555

56-
it('should use ng-form as form name', function() {
56+
it('should use ngForm value as form name', function() {
5757
doc = $compile(
5858
'<div ng-form="myForm">' +
5959
'<input type="text" name="alias" ng-model="value"/>' +

test/ng/directive/inputSpec.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ describe('NgModelController', function() {
233233
});
234234
});
235235

236-
describe('ng-model', function() {
236+
describe('ngModel', function() {
237237

238238
it('should set css classes (ng-valid, ng-invalid, ng-pristine, ng-dirty)',
239239
inject(function($compile, $rootScope, $sniffer) {
@@ -376,7 +376,7 @@ describe('input', function() {
376376
});
377377

378378

379-
it('should ignore input without ng-model attr', function() {
379+
it('should ignore input without ngModel directive', function() {
380380
compileInput('<input type="text" name="whatever" required />');
381381

382382
changeInputValueTo('');
@@ -750,7 +750,7 @@ describe('input', function() {
750750

751751
describe('checkbox', function() {
752752

753-
it('should ignore checkbox without ng-model attr', function() {
753+
it('should ignore checkbox without ngModel directive', function() {
754754
compileInput('<input type="checkbox" name="whatever" required />');
755755

756756
changeInputValueTo('');
@@ -847,7 +847,7 @@ describe('input', function() {
847847
});
848848

849849

850-
it('should ignore textarea without ng-model attr', function() {
850+
it('should ignore textarea without ngModel directive', function() {
851851
compileInput('<textarea name="whatever" required></textarea>');
852852
inputElm = formElm.find('textarea');
853853

@@ -860,7 +860,7 @@ describe('input', function() {
860860
});
861861

862862

863-
describe('ng-list', function() {
863+
describe('ngList', function() {
864864

865865
it('should parse text into an array', function() {
866866
compileInput('<input type="text" ng-model="list" ng-list />');
@@ -941,7 +941,7 @@ describe('input', function() {
941941

942942
describe('required', function() {
943943

944-
it('should allow bindings on ng-required', function() {
944+
it('should allow bindings via ngRequired', function() {
945945
compileInput('<input type="text" ng-model="value" ng-required="required" />');
946946

947947
scope.$apply(function() {
@@ -1015,7 +1015,7 @@ describe('input', function() {
10151015
});
10161016

10171017

1018-
describe('ng-change', function() {
1018+
describe('ngChange', function() {
10191019

10201020
it('should $eval expression after new value is set in the model', function() {
10211021
compileInput('<input type="text" ng-model="value" ng-change="change()" />');
@@ -1040,7 +1040,7 @@ describe('input', function() {
10401040
});
10411041

10421042

1043-
it('should $eval ng-change expression on checkbox', function() {
1043+
it('should $eval ngChange expression on checkbox', function() {
10441044
compileInput('<input type="checkbox" ng-model="foo" ng-change="changeFn()">');
10451045

10461046
scope.changeFn = jasmine.createSpy('changeFn');
@@ -1053,7 +1053,7 @@ describe('input', function() {
10531053
});
10541054

10551055

1056-
describe('ng-value', function() {
1056+
describe('ngValue', function() {
10571057

10581058
it('should evaluate and set constant expressions', function() {
10591059
compileInput('<input type="radio" ng-model="selected" ng-value="true">' +
@@ -1090,7 +1090,7 @@ describe('input', function() {
10901090
});
10911091

10921092

1093-
it('should work inside ng-repeat', function() {
1093+
it('should work inside ngRepeat', function() {
10941094
compileInput(
10951095
'<input type="radio" ng-repeat="i in items" ng-model="$parent.selected" ng-value="i.id">');
10961096

test/ng/directive/ngBindSpec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
describe('ng-bind-*', function() {
3+
describe('ngBind*', function() {
44
var element;
55

66

@@ -9,7 +9,7 @@ describe('ng-bind-*', function() {
99
});
1010

1111

12-
describe('ng-bind', function() {
12+
describe('ngBind', function() {
1313

1414
it('should set text', inject(function($rootScope, $compile) {
1515
element = $compile('<div ng-bind="a"></div>')($rootScope);
@@ -55,9 +55,9 @@ describe('ng-bind-*', function() {
5555
});
5656

5757

58-
describe('ng-bind-template', function() {
58+
describe('ngBindTemplate', function() {
5959

60-
it('should ng-bind-template', inject(function($rootScope, $compile) {
60+
it('should ngBindTemplate', inject(function($rootScope, $compile) {
6161
element = $compile('<div ng-bind-template="Hello {{name}}!"></div>')($rootScope);
6262
$rootScope.name = 'Misko';
6363
$rootScope.$digest();
@@ -74,7 +74,7 @@ describe('ng-bind-*', function() {
7474
});
7575

7676

77-
describe('ng-bind-html', function() {
77+
describe('ngBindHtml', function() {
7878

7979
it('should set html', inject(function($rootScope, $compile) {
8080
element = $compile('<div ng-bind-html="html"></div>')($rootScope);
@@ -100,7 +100,7 @@ describe('ng-bind-*', function() {
100100
});
101101

102102

103-
describe('ng-bind-html-unsafe', function() {
103+
describe('ngBindHtmlUnsafe', function() {
104104

105105
it('should set unsafe html', inject(function($rootScope, $compile) {
106106
element = $compile('<div ng-bind-html-unsafe="html"></div>')($rootScope);

test/ng/directive/ngClassSpec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
describe('ng-class', function() {
3+
describe('ngClass', function() {
44
var element;
55

66

@@ -148,7 +148,7 @@ describe('ng-class', function() {
148148
}));
149149

150150

151-
it('should ng-class odd/even', inject(function($rootScope, $compile) {
151+
it('should ngClass odd/even', inject(function($rootScope, $compile) {
152152
element = $compile('<ul><li ng-repeat="i in [0,1]" class="existing" ng-class-odd="\'odd\'" ng-class-even="\'even\'"></li><ul>')($rootScope);
153153
$rootScope.$digest();
154154
var e1 = jqLite(element[0].childNodes[1]);
@@ -160,7 +160,7 @@ describe('ng-class', function() {
160160
}));
161161

162162

163-
it('should allow both ng-class and ng-class-odd/even on the same element', inject(function($rootScope, $compile) {
163+
it('should allow both ngClass and ngClassOdd/Even on the same element', inject(function($rootScope, $compile) {
164164
element = $compile('<ul>' +
165165
'<li ng-repeat="i in [0,1]" ng-class="\'plainClass\'" ' +
166166
'ng-class-odd="\'odd\'" ng-class-even="\'even\'"></li>' +
@@ -178,7 +178,7 @@ describe('ng-class', function() {
178178
}));
179179

180180

181-
it('should allow both ng-class and ng-class-odd/even with multiple classes', inject(function($rootScope, $compile) {
181+
it('should allow both ngClass and ngClassOdd/Even with multiple classes', inject(function($rootScope, $compile) {
182182
element = $compile('<ul>' +
183183
'<li ng-repeat="i in [0,1]" ng-class="[\'A\', \'B\']" ' +
184184
'ng-class-odd="[\'C\', \'D\']" ng-class-even="[\'E\', \'F\']"></li>' +

test/ng/directive/ngClickSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
describe('ng-click', function() {
3+
describe('ngClick', function() {
44
var element;
55

66
afterEach(function() {

test/ng/directive/ngCloakSpec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
describe('ng-cloak', function() {
3+
describe('ngCloak', function() {
44
var element;
55

66

@@ -17,7 +17,7 @@ describe('ng-cloak', function() {
1717
}));
1818

1919

20-
it('should remove ng-cloak class from a compiled element with attribute', inject(
20+
it('should remove ngCloak class from a compiled element with attribute', inject(
2121
function($rootScope, $compile) {
2222
element = jqLite('<div ng-cloak class="foo ng-cloak bar"></div>');
2323

@@ -33,7 +33,7 @@ describe('ng-cloak', function() {
3333
}));
3434

3535

36-
it('should remove ng-cloak class from a compiled element', inject(function($rootScope, $compile) {
36+
it('should remove ngCloak class from a compiled element', inject(function($rootScope, $compile) {
3737
element = jqLite('<div class="foo ng-cloak bar"></div>');
3838

3939
expect(element.hasClass('foo')).toBe(true);

test/ng/directive/ngControllerSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
describe('ng-controller', function() {
3+
describe('ngController', function() {
44
var element;
55

66
beforeEach(inject(function($window) {

test/ng/directive/ngEventDirsSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe('event directives', function() {
99
});
1010

1111

12-
describe('ng-submit', function() {
12+
describe('ngSubmit', function() {
1313

1414
it('should get called on form submit', inject(function($rootScope, $compile) {
1515
element = $compile('<form action="" ng-submit="submitted = true">' +

test/ng/directive/ngIncludeSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
describe('ng-include', function() {
3+
describe('ngInclude', function() {
44
var element;
55

66

test/ng/directive/ngInitSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
describe('ng-init', function() {
3+
describe('ngInit', function() {
44
var element;
55

66

@@ -9,7 +9,7 @@ describe('ng-init', function() {
99
});
1010

1111

12-
it("should ng-init", inject(function($rootScope, $compile) {
12+
it("should init model", inject(function($rootScope, $compile) {
1313
element = $compile('<div ng-init="a=123"></div>')($rootScope);
1414
expect($rootScope.a).toEqual(123);
1515
}));

test/ng/directive/ngNonBindableSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33

4-
describe('ng-non-bindable', function() {
4+
describe('ngNonBindable', function() {
55
var element;
66

77

test/ng/directive/ngPluralizeSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
describe('ng-pluralize', function() {
3+
describe('ngPluralize', function() {
44
var element;
55

66

test/ng/directive/ngRepeatSpec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
describe('ng-repeat', function() {
3+
describe('ngRepeat', function() {
44
var element;
55

66

@@ -9,7 +9,7 @@ describe('ng-repeat', function() {
99
});
1010

1111

12-
it('should ng-repeat over array', inject(function($rootScope, $compile) {
12+
it('should ngRepeat over array', inject(function($rootScope, $compile) {
1313
element = $compile(
1414
'<ul>' +
1515
'<li ng-repeat="item in items" ng-init="suffix = \';\'" ng-bind="item + suffix"></li>' +
@@ -37,7 +37,7 @@ describe('ng-repeat', function() {
3737
}));
3838

3939

40-
it('should ng-repeat over object', inject(function($rootScope, $compile) {
40+
it('should ngRepeat over object', inject(function($rootScope, $compile) {
4141
element = $compile(
4242
'<ul>' +
4343
'<li ng-repeat="(key, value) in items" ng-bind="key + \':\' + value + \';\' "></li>' +
@@ -48,7 +48,7 @@ describe('ng-repeat', function() {
4848
}));
4949

5050

51-
it('should not ng-repeat over parent properties', inject(function($rootScope, $compile) {
51+
it('should not ngRepeat over parent properties', inject(function($rootScope, $compile) {
5252
var Class = function() {};
5353
Class.prototype.abc = function() {};
5454
Class.prototype.value = 'abc';
@@ -64,14 +64,14 @@ describe('ng-repeat', function() {
6464
}));
6565

6666

67-
it('should error on wrong parsing of ng-repeat', inject(function($rootScope, $compile) {
67+
it('should error on wrong parsing of ngRepeat', inject(function($rootScope, $compile) {
6868
expect(function() {
6969
element = $compile('<ul><li ng-repeat="i dont parse"></li></ul>')($rootScope);
7070
}).toThrow("Expected ngRepeat in form of '_item_ in _collection_' but got 'i dont parse'.");
7171
}));
7272

7373

74-
it("should throw error when left-hand-side of ng-repeat can't be parsed", inject(
74+
it("should throw error when left-hand-side of ngRepeat can't be parsed", inject(
7575
function($rootScope, $compile) {
7676
expect(function() {
7777
element = $compile('<ul><li ng-repeat="i dont parse in foo"></li></ul>')($rootScope);

0 commit comments

Comments
 (0)