style(lint): re-format modules/@angular

This commit is contained in:
Alex Eagle
2016-06-08 16:38:52 -07:00
parent bbed364e7b
commit f39c9c9e75
589 changed files with 21829 additions and 24259 deletions

View File

@ -1,13 +1,4 @@
import {
describe,
it,
iit,
ddescribe,
expect,
inject,
beforeEach,
beforeEachProviders,
} from '@angular/core/testing/testing_internal';
import {describe, it, iit, ddescribe, expect, inject, beforeEach, beforeEachProviders,} from '@angular/core/testing/testing_internal';
import {Injector, provide} from '@angular/core';
@ -23,12 +14,14 @@ export function main() {
() => [HashLocationStrategy, {provide: PlatformLocation, useClass: SpyPlatformLocation}]);
describe('without APP_BASE_HREF', () => {
beforeEach(inject([PlatformLocation, HashLocationStrategy], (pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
platformLocation.spy('pushState');
platformLocation.pathname = '';
}));
beforeEach(inject(
[PlatformLocation, HashLocationStrategy],
(pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
platformLocation.spy('pushState');
platformLocation.pathname = '';
}));
it('should prepend urls with a hash for non-empty URLs', () => {
expect(locationStrategy.prepareExternalUrl('foo')).toEqual('#foo');
@ -63,12 +56,14 @@ export function main() {
describe('with APP_BASE_HREF with neither leading nor trailing slash', () => {
beforeEachProviders(() => [{provide: APP_BASE_HREF, useValue: 'app'}]);
beforeEach(inject([PlatformLocation, HashLocationStrategy], (pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
platformLocation.spy('pushState');
platformLocation.pathname = '';
}));
beforeEach(inject(
[PlatformLocation, HashLocationStrategy],
(pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
platformLocation.spy('pushState');
platformLocation.pathname = '';
}));
it('should prepend urls with a hash for non-empty URLs', () => {
expect(locationStrategy.prepareExternalUrl('foo')).toEqual('#app/foo');
@ -96,12 +91,14 @@ export function main() {
describe('with APP_BASE_HREF with leading slash', () => {
beforeEachProviders(() => [{provide: APP_BASE_HREF, useValue: '/app'}]);
beforeEach(inject([PlatformLocation, HashLocationStrategy], (pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
platformLocation.spy('pushState');
platformLocation.pathname = '';
}));
beforeEach(inject(
[PlatformLocation, HashLocationStrategy],
(pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
platformLocation.spy('pushState');
platformLocation.pathname = '';
}));
it('should prepend urls with a hash for non-empty URLs', () => {
expect(locationStrategy.prepareExternalUrl('foo')).toEqual('#/app/foo');
@ -129,12 +126,14 @@ export function main() {
describe('with APP_BASE_HREF with both leading and trailing slash', () => {
beforeEachProviders(() => [{provide: APP_BASE_HREF, useValue: '/app/'}]);
beforeEach(inject([PlatformLocation, HashLocationStrategy], (pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
platformLocation.spy('pushState');
platformLocation.pathname = '';
}));
beforeEach(inject(
[PlatformLocation, HashLocationStrategy],
(pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
platformLocation.spy('pushState');
platformLocation.pathname = '';
}));
it('should prepend urls with a hash for non-empty URLs', () => {
expect(locationStrategy.prepareExternalUrl('foo')).toEqual('#/app/foo');
@ -160,12 +159,14 @@ export function main() {
});
describe('hashLocationStrategy bugs', () => {
beforeEach(inject([PlatformLocation, HashLocationStrategy], (pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
platformLocation.spy('pushState');
platformLocation.pathname = '';
}));
beforeEach(inject(
[PlatformLocation, HashLocationStrategy],
(pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
platformLocation.spy('pushState');
platformLocation.pathname = '';
}));
it('should not include platform search', () => {
platformLocation.search = '?donotinclude';

View File

@ -1,13 +1,4 @@
import {
describe,
it,
iit,
ddescribe,
expect,
inject,
beforeEach,
beforeEachProviders,
} from '@angular/core/testing/testing_internal';
import {describe, it, iit, ddescribe, expect, inject, beforeEach, beforeEachProviders,} from '@angular/core/testing/testing_internal';
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
import {Injector, provide, ReflectiveInjector} from '@angular/core';
@ -19,8 +10,8 @@ export function main() {
var locationStrategy: any /** TODO #9100 */, location: any /** TODO #9100 */;
function makeLocation(baseHref: string = '/my/app',
provider: any = /*@ts2dart_const*/[]): Location {
function makeLocation(
baseHref: string = '/my/app', provider: any = /*@ts2dart_const*/[]): Location {
locationStrategy = new MockLocationStrategy();
locationStrategy.internalBaseHref = baseHref;
let injector = ReflectiveInjector.resolveAndCreate(
@ -43,7 +34,8 @@ export function main() {
expect(locationStrategy.path()).toEqual('/my/app/user/btford');
});
it('should normalize urls on popstate', inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
it('should normalize urls on popstate',
inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
location.subscribe((ev: any /** TODO #9100 */) => {
expect(ev['url']).toEqual('/user/btford');
@ -78,8 +70,8 @@ export function main() {
var locationStrategy = new MockLocationStrategy();
var location = new Location(locationStrategy);
location.go('/home', "key=value");
expect(location.path()).toEqual("/home?key=value");
location.go('/home', 'key=value');
expect(location.path()).toEqual('/home?key=value');
});
});
}

View File

@ -1,31 +1,17 @@
import {
describe,
it,
iit,
ddescribe,
expect,
inject,
beforeEach,
beforeEachProviders,
} from '@angular/core/testing/testing_internal';
import {describe, it, iit, ddescribe, expect, inject, beforeEach, beforeEachProviders,} from '@angular/core/testing/testing_internal';
import {Injector, provide} from '@angular/core';
import {
PlatformLocation,
LocationStrategy,
PathLocationStrategy,
APP_BASE_HREF
} from '@angular/common';
import {PlatformLocation, LocationStrategy, PathLocationStrategy, APP_BASE_HREF} from '@angular/common';
import {SpyPlatformLocation} from '../spies';
export function main() {
describe('PathLocationStrategy', () => {
var platformLocation: any /** TODO #9100 */, locationStrategy: any /** TODO #9100 */;
beforeEachProviders(() => [
PathLocationStrategy,
{provide: PlatformLocation, useFactory: makeSpyPlatformLocation}
]);
beforeEachProviders(() => [PathLocationStrategy, {
provide: PlatformLocation,
useFactory: makeSpyPlatformLocation
}]);
it('should throw without a base element or APP_BASE_HREF', () => {
platformLocation = new SpyPlatformLocation();
@ -38,10 +24,12 @@ export function main() {
});
describe('without APP_BASE_HREF', () => {
beforeEach(inject([PlatformLocation, PathLocationStrategy], (pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
}));
beforeEach(inject(
[PlatformLocation, PathLocationStrategy],
(pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
}));
it('should prepend urls with a hash for non-empty URLs', () => {
expect(locationStrategy.prepareExternalUrl('foo')).toEqual('foo');
@ -69,12 +57,14 @@ export function main() {
describe('with APP_BASE_HREF with neither leading nor trailing slash', () => {
beforeEachProviders(() => [{provide: APP_BASE_HREF, useValue: 'app'}]);
beforeEach(inject([PlatformLocation, PathLocationStrategy], (pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
platformLocation.spy('pushState');
platformLocation.pathname = '';
}));
beforeEach(inject(
[PlatformLocation, PathLocationStrategy],
(pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
platformLocation.spy('pushState');
platformLocation.pathname = '';
}));
it('should prepend urls with a hash for non-empty URLs', () => {
expect(locationStrategy.prepareExternalUrl('foo')).toEqual('app/foo');
@ -102,12 +92,14 @@ export function main() {
describe('with APP_BASE_HREF with leading slash', () => {
beforeEachProviders(() => [{provide: APP_BASE_HREF, useValue: '/app'}]);
beforeEach(inject([PlatformLocation, PathLocationStrategy], (pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
platformLocation.spy('pushState');
platformLocation.pathname = '';
}));
beforeEach(inject(
[PlatformLocation, PathLocationStrategy],
(pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
platformLocation.spy('pushState');
platformLocation.pathname = '';
}));
it('should prepend urls with a hash for non-empty URLs', () => {
expect(locationStrategy.prepareExternalUrl('foo')).toEqual('/app/foo');
@ -135,12 +127,14 @@ export function main() {
describe('with APP_BASE_HREF with both leading and trailing slash', () => {
beforeEachProviders(() => [{provide: APP_BASE_HREF, useValue: '/app/'}]);
beforeEach(inject([PlatformLocation, PathLocationStrategy], (pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
platformLocation.spy('pushState');
platformLocation.pathname = '';
}));
beforeEach(inject(
[PlatformLocation, PathLocationStrategy],
(pl: any /** TODO #9100 */, ls: any /** TODO #9100 */) => {
platformLocation = pl;
locationStrategy = ls;
platformLocation.spy('pushState');
platformLocation.pathname = '';
}));
it('should prepend urls with a hash for non-empty URLs', () => {
expect(locationStrategy.prepareExternalUrl('foo')).toEqual('/app/foo');