test scaffolder for storage-service

This commit is contained in:
Ivan Socolsky 2017-07-31 11:37:00 -03:00
parent b3f9921f4f
commit 36208ebcd8
No known key found for this signature in database
GPG Key ID: FAECE6A05FAA4F56
3 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,11 @@
import { StorageService } from './storage-service';
describe('Storage Service', () => {
it('should do nothing', () => {
expect(true).toBeTruthy();
});
it('should get', () => {
var storage = new StorageService();
expect(storage.get('myKey')).toEqual('myKey');
});
});

View File

@ -7,4 +7,7 @@ export class StorageService {
console.log('Hello StorageService Provider');
}
public get(key:string):string {
return key;
}
}

View File

@ -11,7 +11,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { getTestBed, TestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
import { App, Config, Form, IonicModule, Keyboard, DomController, MenuController, NavController, Platform } from 'ionic-angular';
import { ConfigMock } from './mocks';
//import { ConfigMock } from './mocks';
// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
declare var __karma__: any;