Skip to content

Commit

Permalink
Don't mock Ionic when configuring the testing module closes #175
Browse files Browse the repository at this point in the history
  • Loading branch information
lathonez committed Nov 16, 2016
1 parent ee71657 commit 2f49f96
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<a name="2.2.1"></a>
# 2.2.1 (2016-11-17)

### Bug Fixes

* **Unit**: Don't mock Ionic when configuring the testing module [#175](https://github.com/lathonez/clicker/issues/175) ([](https://github.com/lathonez/clicker/commit/))

<a name="2.2.0"></a>
# 2.2.0 (2016-11-07)

Expand All @@ -10,14 +17,14 @@

### Bug Fixes

* **Build**: Using environment variables for travis build directory #162 [#162](https://github.com/lathonez/clicker/issues/162) ([9f81dc4](https://github.com/lathonez/clicker/commit/9f81dc4))
* **Build**: Using environment variables for travis build directory [#162](https://github.com/lathonez/clicker/issues/162) ([9f81dc4](https://github.com/lathonez/clicker/commit/9f81dc4))

<a name="2.1.1"></a>
# 2.1.1 (2016-10-31)

### Bug Fixes

* **Unit**: Windows 10 needs explicit excludes #159 [#159](https://github.com/lathonez/clicker/issues/159) ([0e55cc1](https://github.com/lathonez/clicker/commit/0e55cc1))
* **Unit**: Windows 10 needs explicit excludes [#159](https://github.com/lathonez/clicker/issues/159) ([0e55cc1](https://github.com/lathonez/clicker/commit/0e55cc1))

<a name="2.1.0"></a>
# 2.1.0 (2016-10-30)
Expand All @@ -32,7 +39,7 @@
### Bug Fixes

* **Unit**: Barrels aren't working with modules since latest upgrade: ([0c0993b](https://github.com/lathonez/clicker/commit/0c0993b))
* **Unit**: Add compileComponents to beforeEach, use ng-cli's tsconfig.json for testing for #155 [#155](https://github.com/lathonez/clicker/issues/155) ([d59d968](https://github.com/lathonez/clicker/commit/d59d968))
* **Unit**: Add compileComponents to beforeEach, use ng-cli's tsconfig.json for testing for [#155](https://github.com/lathonez/clicker/issues/155) ([d59d968](https://github.com/lathonez/clicker/commit/d59d968))

<a name="2.0.0"></a>
# 2.0.0 (2016-10-16)
Expand Down
1 change: 1 addition & 0 deletions src/pages/clickerList/clickerList.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('ClickerList', () => {
beforeEach(async(() => TestUtils.beforeEachCompiler([ClickerList, ClickerForm, ClickerButton]).then(compiled => {
fixture = compiled.fixture;
instance = compiled.instance;
fixture.detectChanges();
})));

afterEach(() => {
Expand Down
1 change: 1 addition & 0 deletions src/pages/page2/page2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ describe('Pages: Page2', () => {
beforeEach(async(() => TestUtils.beforeEachCompiler([Page2]).then(compiled => {
fixture = compiled.fixture;
instance = compiled.instance;
fixture.detectChanges();
})));

afterEach(() => {
Expand Down
9 changes: 2 additions & 7 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'zone.js/dist/fake-async-test';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { TestBed } from '@angular/core/testing';
import { App, MenuController, NavController, Platform, Config, Keyboard, Form, IonicModule } from 'ionic-angular';
import { ConfigMock, NavMock, PlatformMock } from './mocks';
import { ConfigMock } from './mocks';
import { ClickersServiceMock } from './services/clickers.mock';
import { ClickersService } from './services';

Expand Down Expand Up @@ -58,13 +58,8 @@ export class TestUtils {
...components,
],
providers: [
{provide: App, useClass: ConfigMock},
App, Platform, Form, Keyboard, MenuController, NavController,
{provide: Config, useClass: ConfigMock},
Form,
{provide: Keyboard, useClass: ConfigMock},
{provide: MenuController, useClass: ConfigMock},
{provide: NavController, useClass: NavMock},
{provide: Platform, useClass: PlatformMock},
{provide: ClickersService, useClass: ClickersServiceMock},
],
imports: [
Expand Down

0 comments on commit 2f49f96

Please sign in to comment.