{"action":"created","issue":{"url":"https://api.github.com/repos/NetanelBasal/spectator/issues/55","repository_url":"https://api.github.com/repos/NetanelBasal/spectator","labels_url":"https://api.github.com/repos/NetanelBasal/spectator/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/NetanelBasal/spectator/issues/55/comments","events_url":"https://api.github.com/repos/NetanelBasal/spectator/issues/55/events","html_url":"https://github.com/NetanelBasal/spectator/issues/55","id":389412892,"node_id":"MDU6SXNzdWUzODk0MTI4OTI=","number":55,"title":"Imports in createService method doesn't work","user":{"login":"slawojstanislawski","id":6184487,"node_id":"MDQ6VXNlcjYxODQ0ODc=","avatar_url":"https://avatars2.githubusercontent.com/u/6184487?v=4","gravatar_id":"","url":"https://api.github.com/users/slawojstanislawski","html_url":"https://github.com/slawojstanislawski","followers_url":"https://api.github.com/users/slawojstanislawski/followers","following_url":"https://api.github.com/users/slawojstanislawski/following{/other_user}","gists_url":"https://api.github.com/users/slawojstanislawski/gists{/gist_id}","starred_url":"https://api.github.com/users/slawojstanislawski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slawojstanislawski/subscriptions","organizations_url":"https://api.github.com/users/slawojstanislawski/orgs","repos_url":"https://api.github.com/users/slawojstanislawski/repos","events_url":"https://api.github.com/users/slawojstanislawski/events{/privacy}","received_events_url":"https://api.github.com/users/slawojstanislawski/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-10T17:42:34Z","updated_at":"2018-12-12T08:47:28Z","closed_at":"2018-12-12T08:47:28Z","author_association":"NONE","body":"This is an example tested service, which uses Angular's FormBuilder:\r\n\r\n```\r\nimport {Injectable} from '@angular/core';\r\nimport {FormBuilder} from '@angular/forms';\r\n\r\n@Injectable()\r\nexport class FormsService {\r\n  constructor(\r\n    private fb: FormBuilder,\r\n  ) {}\r\n}\r\n```\r\n\r\nHere's the test case for it, using the 'imports' property\r\n```\r\nimport {ReactiveFormsModule} from \"@angular/forms\";\r\nimport {createService} from \"@netbasal/spectator\";\r\nimport {FormsService} from \"./media.service\";\r\n\r\ndescribe('FormsService', () => {\r\n  const spectator = createService<FormsService>({\r\n    imports: [\r\n      ReactiveFormsModule\r\n    ],\r\n    service: FormsService,\r\n  });\r\n\r\n  it('should create', () => {\r\n    expect(spectator.service).toBeTruthy();\r\n  });\r\n});\r\n```\r\n\r\nWhat I get in an error - it doesn't find the FormBuilder:\r\n`Error: StaticInjectorError(DynamicTestModule)[FormsService -> FormBuilder]: \r\n  StaticInjectorError(Platform: core)[FormsService -> FormBuilder]: \r\n    NullInjectorError: No provider for FormBuilder!`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/NetanelBasal/spectator/issues/comments/446508358","html_url":"https://github.com/NetanelBasal/spectator/issues/55#issuecomment-446508358","issue_url":"https://api.github.com/repos/NetanelBasal/spectator/issues/55","id":446508358,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjUwODM1OA==","user":{"login":"NetanelBasal","id":6745730,"node_id":"MDQ6VXNlcjY3NDU3MzA=","avatar_url":"https://avatars1.githubusercontent.com/u/6745730?v=4","gravatar_id":"","url":"https://api.github.com/users/NetanelBasal","html_url":"https://github.com/NetanelBasal","followers_url":"https://api.github.com/users/NetanelBasal/followers","following_url":"https://api.github.com/users/NetanelBasal/following{/other_user}","gists_url":"https://api.github.com/users/NetanelBasal/gists{/gist_id}","starred_url":"https://api.github.com/users/NetanelBasal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NetanelBasal/subscriptions","organizations_url":"https://api.github.com/users/NetanelBasal/orgs","repos_url":"https://api.github.com/users/NetanelBasal/repos","events_url":"https://api.github.com/users/NetanelBasal/events{/privacy}","received_events_url":"https://api.github.com/users/NetanelBasal/received_events","type":"User","site_admin":false},"created_at":"2018-12-12T08:47:28Z","updated_at":"2018-12-12T08:47:28Z","author_association":"OWNER","body":"Works on the latest RC version. \r\nhttps://stackblitz.com/edit/angular-testing-spectator-neorxf"}}
{"actor":{"display_login":"NetanelBasal"}}