Skip to content

Commit

Permalink
chore(package): Update to Angular 2 RC4
Browse files Browse the repository at this point in the history
  • Loading branch information
Jussi Kinnula authored and Alex Weber committed Jul 6, 2016
1 parent b379c73 commit 1e8145c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
},
"homepage": "https://github.com/SebastianM/angular2-google-maps#readme",
"dependencies": {
"@angular/common": "2.0.0-rc.2",
"@angular/compiler": "2.0.0-rc.2",
"@angular/core": "2.0.0-rc.2",
"@angular/platform-browser": "2.0.0-rc.2",
"@angular/platform-browser-dynamic": "2.0.0-rc.2",
"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
"@angular/core": "2.0.0-rc.4",
"@angular/platform-browser": "2.0.0-rc.4",
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
"es6-shim": "^0.35.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
Expand Down Expand Up @@ -72,11 +72,11 @@
"jspm": {
"jspmNodeConversion": false,
"dependencies": {
"@angular/common": "2.0.0-rc.2",
"@angular/compiler": "2.0.0-rc.2",
"@angular/core": "2.0.0-rc.2",
"@angular/platform-browser": "2.0.0-rc.2",
"@angular/platform-browser-dynamic": "2.0.0-rc.2",
"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
"@angular/core": "2.0.0-rc.4",
"@angular/platform-browser": "2.0.0-rc.4",
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
"es6-shim": "^0.35.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
Expand Down
18 changes: 10 additions & 8 deletions test/services/managers/marker-manager.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {NgZone, provide} from '@angular/core';
import {async, beforeEachProviders, describe, expect, inject, it} from '@angular/core/testing';
import {NgZone} from '@angular/core';
import {addProviders, async, describe, inject, it} from '@angular/core/testing';

import {SebmGoogleMapMarker} from '../../../src/core/directives/google-map-marker';
import {GoogleMapsAPIWrapper} from '../../../src/core/services/google-maps-api-wrapper';
Expand All @@ -8,12 +8,14 @@ import {MarkerManager} from '../../../src/core/services/managers/marker-manager'

export function main() {
describe('MarkerManager', () => {
beforeEachProviders(
() =>
[provide(NgZone, {useFactory: () => new NgZone({enableLongStackTrace: true})}),
MarkerManager, SebmGoogleMapMarker, provide(GoogleMapsAPIWrapper, {
useValue: jasmine.createSpyObj('GoogleMapsAPIWrapper', ['createMarker'])
})]);
beforeEach(() => {
addProviders([
{ provide: NgZone, useFactory: () => new NgZone({enableLongStackTrace: true}) },
MarkerManager,
SebmGoogleMapMarker,
{ provide: GoogleMapsAPIWrapper, useValue: jasmine.createSpyObj('GoogleMapsAPIWrapper', ['createMarker'])}
]);
});

describe('Create a new marker', () => {
it('should call the mapsApiWrapper when creating a new marker',
Expand Down
16 changes: 7 additions & 9 deletions test/services/maps-api-loader/lazy-maps-api-loader.spec.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import {provide} from '@angular/core';
import {beforeEachProviders, describe, expect, inject, it} from '@angular/core/testing';
import {addProviders, describe, inject, it} from '@angular/core/testing';

import {LazyMapsAPILoader} from '../../../src/core/services/maps-api-loader/lazy-maps-api-loader';
import {MapsAPILoader} from '../../../src/core/services/maps-api-loader/maps-api-loader';
import {DOCUMENT_GLOBAL, WINDOW_GLOBAL} from '../../../src/core/utils/browser-globals';

export function main() {
describe('Service: LazyMapsAPILoader', () => {
beforeEachProviders(() => {
return [
provide(MapsAPILoader, {useClass: LazyMapsAPILoader}),
provide(WINDOW_GLOBAL, {useValue: {}}), provide(DOCUMENT_GLOBAL, {
useValue: jasmine.createSpyObj<Document>('Document', ['createElement'])
})
];
beforeEach(() => {
addProviders([
{ provide: MapsAPILoader, useClass: LazyMapsAPILoader },
{ provide: WINDOW_GLOBAL, useValue: {} },
{ provide: DOCUMENT_GLOBAL, useValue: jasmine.createSpyObj<Document>('Document', ['createElement'])}
]);
});

it('should create the default script URL',
Expand Down

3 comments on commit 1e8145c

@alexweber
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SebastianM I've updated the tests for the RC4 breaking changes (beforeEachProviders and import cleanup). I also took the opportunity to use the new map literal syntax for the providers and clean them up a tiny bit as it avoids importing and using provide

@sebholstein
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks man! πŸ‘

@erodozer
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package version number was not updated in this commit nor was the update published. Please do both so projects on rc4 can use this package again without having to depend on a git linked dependency.

Please sign in to comment.