From c1eef1cca2f96e7bb923c4e88613838142df2394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Rodrigues=20de=20Alc=C3=A2ntara?= Date: Tue, 12 Jul 2016 10:59:30 -0300 Subject: [PATCH 1/3] chore(@angular): Bump @angular version to rc4 Update @angular to RC4 Update karma libraries Update SystemJS library Update TSLint library Update Typings library Remove `MockLocationStrategy` references and usages from `sign-in.component.spec.ts`, `sign-up.component.spec.ts` and `app.component.spec.ts` --- package.json | 24 +++++++++--------- src/app/+sign-in/sign-in.component.spec.ts | 2 -- src/app/+sign-up/sign-up.component.spec.ts | 5 +--- src/app/app.component.spec.ts | 29 ++++++++-------------- 4 files changed, 23 insertions(+), 37 deletions(-) diff --git a/package.json b/package.json index 7bb77cb..77cee59 100644 --- a/package.json +++ b/package.json @@ -22,13 +22,13 @@ }, "private": true, "dependencies": { - "@angular/common": "2.0.0-rc.3", - "@angular/compiler": "2.0.0-rc.3", - "@angular/core": "2.0.0-rc.3", + "@angular/common": "2.0.0-rc.4", + "@angular/compiler": "2.0.0-rc.4", + "@angular/core": "2.0.0-rc.4", "@angular/forms": "^0.2.0", - "@angular/http": "^2.0.0-rc.3", - "@angular/platform-browser": "2.0.0-rc.3", - "@angular/platform-browser-dynamic": "2.0.0-rc.3", + "@angular/http": "^2.0.0-rc.4", + "@angular/platform-browser": "2.0.0-rc.4", + "@angular/platform-browser-dynamic": "2.0.0-rc.4", "@angular/router": "3.0.0-alpha.7", "@angular2-material/button": "^2.0.0-alpha.6", "@angular2-material/card": "^2.0.0-alpha.6", @@ -49,7 +49,7 @@ "es6-shim": "^0.35.0", "reflect-metadata": "0.1.3", "rxjs": "5.0.0-beta.6", - "systemjs": "0.19.26", + "systemjs": "0.19.31", "zone.js": "^0.6.12" }, "devDependencies": { @@ -65,10 +65,10 @@ "ember-cli-inject-live-reload": "^1.4.0", "jasmine-core": "^2.4.1", "jasmine-spec-reporter": "^2.4.0", - "karma": "^0.13.15", - "karma-chrome-launcher": "^0.2.3", + "karma": "^1.1.1", + "karma-chrome-launcher": "^1.0.1", "karma-coverage": "^1.0.0", - "karma-jasmine": "^0.3.8", + "karma-jasmine": "^1.0.2", "karma-mocha-reporter": "^2.0.3", "karma-phantomjs-launcher": "^1.0.0", "karma-sourcemap-loader": "^0.3.7", @@ -77,9 +77,9 @@ "protractor-cucumber-framework": "^0.5.0", "remap-istanbul": "^0.6.4", "ts-node": "^0.5.5", - "tslint": "^3.6.0", + "tslint": "^3.13.0", "typescript": "^1.8.10", - "typings": "^0.8.1" + "typings": "^1.3.1" }, "config": { "commitizen": { diff --git a/src/app/+sign-in/sign-in.component.spec.ts b/src/app/+sign-in/sign-in.component.spec.ts index eee29be..adebe55 100644 --- a/src/app/+sign-in/sign-in.component.spec.ts +++ b/src/app/+sign-in/sign-in.component.spec.ts @@ -9,7 +9,6 @@ import { import { ActivatedRoute, DefaultUrlSerializer, Router, RouterConfig, RouterOutletMap, UrlSerializer } from '@angular/router'; import { Location, LocationStrategy } from '@angular/common'; -import { MockLocationStrategy } from '@angular/common/testing/mock_location_strategy'; import { SpyLocation } from '@angular/common/testing'; import { By } from '@angular/platform-browser'; @@ -32,7 +31,6 @@ describe('Component: SignIn', () => { RouterOutletMap, {provide: UrlSerializer, useClass: DefaultUrlSerializer}, {provide: Location, useClass: SpyLocation}, - {provide: LocationStrategy, useClass: MockLocationStrategy}, { provide: Router, useFactory: (resolver: ComponentResolver, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location, injector: Injector) => { diff --git a/src/app/+sign-up/sign-up.component.spec.ts b/src/app/+sign-up/sign-up.component.spec.ts index 75f20bc..b694f3d 100644 --- a/src/app/+sign-up/sign-up.component.spec.ts +++ b/src/app/+sign-up/sign-up.component.spec.ts @@ -4,14 +4,12 @@ import { describe, expect, it, - inject, - injectAsync, + inject } from '@angular/core/testing'; import { ActivatedRoute, DefaultUrlSerializer, Router, RouterConfig, RouterOutletMap, UrlSerializer } from '@angular/router'; import { Location, LocationStrategy } from '@angular/common'; import { Observable } from 'rxjs/Observable'; -import { MockLocationStrategy } from '@angular/common/testing/mock_location_strategy'; import { SpyLocation } from '@angular/common/testing'; import { By } from '@angular/platform-browser'; @@ -51,7 +49,6 @@ describe('Component: SignUp', () => { RouterOutletMap, {provide: UrlSerializer, useClass: DefaultUrlSerializer}, {provide: Location, useClass: SpyLocation}, - {provide: LocationStrategy, useClass: MockLocationStrategy}, { provide: Router, useFactory: (resolver: ComponentResolver, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location, injector: Injector) => { diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index 74b84cb..71ed8a6 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -9,7 +9,6 @@ import { import { ActivatedRoute, DefaultUrlSerializer, Router, RouterConfig, RouterOutletMap, UrlSerializer } from '@angular/router'; import { Location, LocationStrategy } from '@angular/common'; import { Observable } from 'rxjs/Observable'; -import { MockLocationStrategy } from '@angular/common/testing/mock_location_strategy'; import { SpyLocation } from '@angular/common/testing'; import { Component, provide, ComponentResolver, Injector } from '@angular/core'; @@ -17,28 +16,20 @@ import { Component, provide, ComponentResolver, Injector } from '@angular/core'; import { AppComponent } from './app.component'; import { MessageService, MessageComponent } from './shared/message/index'; -class MockRouter extends Router { - constructor() { - super(null, null, null, null, null, null, null); - } -} -let routerProviderMock = {provide: Router, useFactory: () => { return new MockRouter()}}; - beforeEachProviders(() => { let config: RouterConfig = [{path: '', component: AppComponent}]; return [ RouterOutletMap, - {provide: UrlSerializer, useClass: DefaultUrlSerializer}, - {provide: Location, useClass: SpyLocation}, - {provide: LocationStrategy, useClass: MockLocationStrategy}, - { - provide: Router, - useFactory: (resolver: ComponentResolver, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location, injector: Injector) => { - return new Router(AppComponent, resolver, urlSerializer, outletMap, location, injector, config); - }, - deps: [ComponentResolver, UrlSerializer, RouterOutletMap, Location, Injector] + {provide: UrlSerializer, useClass: DefaultUrlSerializer}, + {provide: Location, useClass: SpyLocation}, + { + provide: Router, + useFactory: (resolver: ComponentResolver, urlSerializer: UrlSerializer, outletMap: RouterOutletMap, location: Location, injector: Injector) => { + return new Router(AppComponent, resolver, urlSerializer, outletMap, location, injector, config); }, - {provide: ActivatedRoute, useFactory: (r: Router) => r.routerState.root, deps: [Router]}, + deps: [ComponentResolver, UrlSerializer, RouterOutletMap, Location, Injector] + }, + {provide: ActivatedRoute, useFactory: (r: Router) => r.routerState.root, deps: [Router]}, MessageService, AppComponent ] @@ -51,4 +42,4 @@ describe('App: AppComponent', () => { it('should have as title \'Equalize rocks!\'', inject([AppComponent], (app: AppComponent) => { expect(app.title).toEqual('Equalize rocks!'); })); -}); +}); \ No newline at end of file From 8125a32c240d6d01b3e73fbf22d69ffceb366f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Rodrigues=20de=20Alc=C3=A2ntara?= Date: Tue, 12 Jul 2016 14:08:40 -0300 Subject: [PATCH 2/3] style(white-space): Remove white-space --- src/app/app.component.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index 71ed8a6..7dc3b63 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -19,7 +19,7 @@ import { MessageService, MessageComponent } from './shared/message/index'; beforeEachProviders(() => { let config: RouterConfig = [{path: '', component: AppComponent}]; return [ - RouterOutletMap, + RouterOutletMap, {provide: UrlSerializer, useClass: DefaultUrlSerializer}, {provide: Location, useClass: SpyLocation}, { From a5bdf3b87a98d0457f35af16bddc6648b51e282e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Rodrigues=20de=20Alc=C3=A2ntara?= Date: Tue, 12 Jul 2016 14:51:54 -0300 Subject: [PATCH 3/3] chore(ts-node): Update TypeScript Node --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 77cee59..73aaaaf 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "protractor": "^3.3.0", "protractor-cucumber-framework": "^0.5.0", "remap-istanbul": "^0.6.4", - "ts-node": "^0.5.5", + "ts-node": "^0.7.3", "tslint": "^3.13.0", "typescript": "^1.8.10", "typings": "^1.3.1"