Skip to content

Commit 00aa7a7

Browse files
authored
chore(tests): enable lint, make it green. (angular#10224)
1 parent 27b87ef commit 00aa7a7

File tree

106 files changed

+1561
-1596
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+1561
-1596
lines changed

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ gulp.task('lint', ['format:enforce', 'tools:build'], () => {
9797
// Built-in rules are at
9898
// https://github.com/palantir/tslint#supported-rules
9999
const tslintConfig = require('./tslint.json');
100-
return gulp.src(['modules/@angular/**/*.ts', '!modules/@angular/*/test/**'])
100+
return gulp.src(['modules/@angular/**/*.ts'])
101101
.pipe(tslint({
102102
tslint: require('tslint').default,
103103
configuration: tslintConfig,

modules/@angular/common/test/directives/ng_class_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ export function main() {
581581
}));
582582

583583
});
584-
})
584+
});
585585
}
586586

587587
@Component({selector: 'test-cmp', directives: [NgClass, NgFor], template: ''})

modules/@angular/common/test/directives/ng_for_spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {beforeEach, beforeEachProviders, ddescribe, describe, iit, inject, it, xit,} from '@angular/core/testing/testing_internal';
10-
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
9+
import {AsyncTestCompleter, beforeEach, beforeEachProviders, ddescribe, describe, iit, inject, it, xit,} from '@angular/core/testing/testing_internal';
1110
import {TestComponentBuilder} from '@angular/core/testing';
1211
import {ListWrapper} from '../../src/facade/collection';
1312
import {IS_DART} from '../../src/facade/lang';
@@ -182,7 +181,7 @@ export function main() {
182181
.then((fixture) => {
183182
fixture.debugElement.componentInstance.items = 'whaaa';
184183
try {
185-
fixture.detectChanges()
184+
fixture.detectChanges();
186185
} catch (e) {
187186
expect(e.message).toContain(
188187
`Cannot find a differ supporting object 'whaaa' of type 'string'. NgFor only supports binding to Iterables such as Arrays.`);

modules/@angular/common/test/directives/ng_if_spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {beforeEach, ddescribe, describe, iit, inject, it, xit,} from '@angular/core/testing/testing_internal';
9+
import {AsyncTestCompleter, beforeEach, ddescribe, describe, iit, inject, it, xit,} from '@angular/core/testing/testing_internal';
1010
import {TestComponentBuilder} from '@angular/core/testing';
11-
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
1211
import {expect} from '@angular/platform-browser/testing/matchers';
1312
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
1413

modules/@angular/common/test/directives/ng_plural_spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {beforeEachProviders, beforeEach, ddescribe, describe, expect, iit, inject, it, xit,} from '@angular/core/testing/testing_internal';
10-
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
9+
import {AsyncTestCompleter, beforeEachProviders, beforeEach, ddescribe, describe, expect, iit, inject, it, xit,} from '@angular/core/testing/testing_internal';
1110
import {TestComponentBuilder} from '@angular/core/testing';
1211

1312
import {Component, Injectable} from '@angular/core';

modules/@angular/common/test/directives/ng_style_spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {beforeEach, beforeEachProviders, ddescribe, xdescribe, describe, expect, iit, inject, it, xit,} from '@angular/core/testing/testing_internal';
9+
import {AsyncTestCompleter, beforeEach, beforeEachProviders, ddescribe, xdescribe, describe, expect, iit, inject, it, xit,} from '@angular/core/testing/testing_internal';
1010
import {TestComponentBuilder} from '@angular/core/testing';
11-
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
1211

1312
import {StringMapWrapper} from '../../src/facade/collection';
1413

@@ -191,7 +190,7 @@ export function main() {
191190
async.done();
192191
});
193192
}));
194-
})
193+
});
195194
}
196195

197196
@Component({selector: 'test-cmp', directives: [NgStyle], template: ''})

modules/@angular/common/test/directives/ng_switch_spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {beforeEach, ddescribe, describe, expect, iit, inject, it, xit,} from '@angular/core/testing/testing_internal';
10-
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
9+
import {AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit,} from '@angular/core/testing/testing_internal';
10+
1111
import {Component} from '@angular/core';
1212
import {TestComponentBuilder} from '@angular/core/testing';
1313

modules/@angular/common/test/directives/ng_template_outlet_spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {beforeEach, ddescribe, describe, expect, iit, inject, it, xit,} from '@angular/core/testing/testing_internal';
9+
import {AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit,} from '@angular/core/testing/testing_internal';
1010
import {TestComponentBuilder} from '@angular/core/testing';
11-
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
1211
import {Component, Directive, TemplateRef, ContentChildren, QueryList} from '@angular/core';
1312
import {NgTemplateOutlet} from '@angular/common';
1413

modules/@angular/common/test/directives/non_bindable_spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {beforeEach, ddescribe, describe, expect, iit, inject, it, xit,} from '@angular/core/testing/testing_internal';
9+
import {AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit,} from '@angular/core/testing/testing_internal';
1010
import {TestComponentBuilder} from '@angular/core/testing';
1111
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
1212
import {Component, Directive} from '@angular/core';
1313
import {ElementRef} from '@angular/core/src/linker/element_ref';
14-
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
1514

1615
export function main() {
1716
describe('non-bindable', () => {
@@ -61,7 +60,7 @@ export function main() {
6160
async.done();
6261
});
6362
}));
64-
})
63+
});
6564
}
6665

6766
@Directive({selector: '[test-dec]'})

modules/@angular/common/test/forms-deprecated/integration_spec.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88

99
import {NgFor, NgIf} from '@angular/common';
1010
import {Control, ControlGroup, ControlValueAccessor, DeprecatedFormsModule, NG_ASYNC_VALIDATORS, NG_VALIDATORS, NgControl, NgForm, RadioButtonState, Validator, Validators} from '@angular/common/src/forms-deprecated';
11-
import {Component, Directive, EventEmitter, Output} from '@angular/core';
12-
import {Input, Provider, forwardRef} from '@angular/core';
11+
import {Component, Directive, EventEmitter, Input, Output, Provider, forwardRef} from '@angular/core';
1312
import {ComponentFixture, TestComponentBuilder, configureModule, fakeAsync, flushMicrotasks, tick} from '@angular/core/testing';
14-
import {afterEach, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
15-
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
13+
import {AsyncTestCompleter, afterEach, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
1614
import {By} from '@angular/platform-browser/src/dom/debug/by';
1715
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
1816
import {dispatchEvent} from '@angular/platform-browser/testing/browser_util';
@@ -24,7 +22,7 @@ import {PromiseWrapper} from '../../src/facade/promise';
2422
export function main() {
2523
describe('integration tests', () => {
2624

27-
beforeEach(() => {configureModule({modules: [DeprecatedFormsModule]})});
25+
beforeEach(() => { configureModule({modules: [DeprecatedFormsModule]}); });
2826

2927
it('should initialize DOM elements with the given form object',
3028
inject(

0 commit comments

Comments
 (0)