title: Setting up a Test Bed in Ionic Provider
body: <p>I am really new into Ionic and Unit Testing. Current version is 3.12.0. I am using Karma and Jasmine for unit testing.</p>
  
  <p>I have a provider called <strong>test-service.ts</strong></p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { Http } from '@angular/http';
  import 'rxjs/add/operator/map';
  
  /*
    Generated class for the TestServiceProvider provider.
  
    See https://angular.io/guide/dependency-injection for more info on providers
    and Angular DI.
  */
  @Injectable()
  export class TestServiceProvider {
  
    constructor(public http: Http) {
      console.log('Hello TestServiceProvider Provider');
    }
  
  }
  </code></pre>
  
  <p>Then I have a test spec in the same folder as follows contains a simple test with a test bed.</p>
  
  <pre><code>import { TestServiceProvider } from './test-service';
  import { TestBed, TestModuleMetadata, async, ComponentFixture } from '@angular/core/testing';
  
  describe('Test Service', () =&gt; {
    let component: TestServiceProvider;
    let fixture: ComponentFixture&lt;TestServiceProvider&gt;;
  
    beforeEach(async( () =&gt; {
      TestBed.configureTestingModule({
        imports: [TestServiceProvider]
      }).compileComponents;
    }));
  
    beforeEach( () =&gt; {
      fixture = TestBed.createComponent(TestServiceProvider);
      component = fixture.componentInstance;
    });
  
    it('should add numbers', () =&gt; {
      expect(1+1).toBe(2);
    });
  });
  </code></pre>
  
  <p>But when I run <code>npm test</code> it gives me an error  </p>
  
  <pre><code>Unexpected value 'TestServiceProvider' imported by the module 'DynamicTestModule'. Please add a @NgModule annotation.
  </code></pre>
  
  <p>What am I doing wrong here and how do I fix this? </p>