while writing jasmine unit test case for one of my angular 2 component, if I add CookieService in provider list then all remaining other component unit test cases are failing. If I remove CookieService from provider list then test cases are working fine. You can check this at plunker cookiservice unit test.my component spec file code:
import {setBaseTestProviders} from 'angular2/testing';
import {beforeEachProviders,beforeEach,describe,expect,it} from 'angular2/testing';
import {MyComponent} from '../src/my.component';
import {CookieService} from 'angular2-cookie/core';
describe('MyComponent', () => {
beforeEach(() => {
setBaseTestProviders(CookieService);
})
it('sample test', () => {
expect('test').toEqual('test');
});
});