{"action":"opened","issue":{"url":"https://api.github.com/repos/FountainJS/generator-fountain-angular2/issues/69","repository_url":"https://api.github.com/repos/FountainJS/generator-fountain-angular2","labels_url":"https://api.github.com/repos/FountainJS/generator-fountain-angular2/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/FountainJS/generator-fountain-angular2/issues/69/comments","events_url":"https://api.github.com/repos/FountainJS/generator-fountain-angular2/issues/69/events","html_url":"https://github.com/FountainJS/generator-fountain-angular2/issues/69","id":164045901,"number":69,"title":"\"No provider for TestComponentBuilder!\"","user":{"login":"wembernard","id":11645044,"avatar_url":"https://avatars.githubusercontent.com/u/11645044?v=3","gravatar_id":"","url":"https://api.github.com/users/wembernard","html_url":"https://github.com/wembernard","followers_url":"https://api.github.com/users/wembernard/followers","following_url":"https://api.github.com/users/wembernard/following{/other_user}","gists_url":"https://api.github.com/users/wembernard/gists{/gist_id}","starred_url":"https://api.github.com/users/wembernard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wembernard/subscriptions","organizations_url":"https://api.github.com/users/wembernard/orgs","repos_url":"https://api.github.com/users/wembernard/repos","events_url":"https://api.github.com/users/wembernard/events{/privacy}","received_events_url":"https://api.github.com/users/wembernard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-06T10:29:54Z","updated_at":"2016-07-06T10:29:54Z","closed_at":null,"body":"Hi guys,\r\n\r\n### DESCRIPTION \r\n\r\nI've been wasting some time to make this work\r\n\r\n```typescript\r\n/// <reference path=\"../../typings/index.d.ts\"/>\r\n\r\nimport 'reflect-metadata';\r\nimport 'zone.js/dist/zone';\r\nimport 'zone.js/dist/async-test';\r\n\r\nimport {describe, it, expect, beforeEachProviders, inject, async, setBaseTestProviders, TestComponentBuilder, ComponentFixture} from '@angular/core/testing';\r\nimport {TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS} from '@angular/platform-browser-dynamic/testing';\r\n\r\nimport { AppComponent } from './app.component';\r\n\r\ndescribe('Basic test', () => {\r\n  it('expect null is not the same thing as undefined',\r\n    () => expect(null).not.toEqual(undefined)\r\n  );\r\n});\r\n\r\ndescribe('App Component', () => {\r\n  it('should render some title', async(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {\r\n    tcb.createAsync(AppComponent)\r\n    .then((fixture: ComponentFixture<any>) => {\r\n      fixture.detectChanges();\r\n      const app = fixture.nativeElement;\r\n      expect(app.querySelector('h1').textContent).toBe('Hello World');\r\n    });\r\n  })));\r\n});\r\n```\r\nwhich fails when I run `npm run test` \r\n```\r\nChrome 51.0.2704 (Mac OS X 10.11.4) App Component should render some title FAILED\r\n\tError: No provider for TestComponentBuilder!\r\n\tError: DI Exception\r\n```\r\n\r\n### CONTEXT\r\n\r\nI've been using `generator-fountain-angular2` @ `0.5.4`. Since it was seemed more painful to bootstrap a brand new `generator-fountain-angular2` using `0.6.0` and move all my work there, I scaffolded 0.6.0 in some temp directory to compare and update my working directory. All was doing fine (Angular RC4, Router, ...) except this test. \r\n\r\nIn your hello.spec.ts, `npm run test` works just fine but in mine, it just fails. \r\n\r\nI suspect you already had this problem when you wrote this code hopefuly. \r\n\r\n### POSTSCRIPTUM\r\n\r\n- How do you update `typings` directory and `typings.json`?\r\nIs it something you hardcode in your generator or some command that should rebuild this directory ?\r\n"}}
{"actor":{"display_login":"wembernard"}}