{"action":"closed","issue":{"url":"https://api.github.com/repos/angular/angular-cli/issues/12086","repository_url":"https://api.github.com/repos/angular/angular-cli","labels_url":"https://api.github.com/repos/angular/angular-cli/issues/12086/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular-cli/issues/12086/comments","events_url":"https://api.github.com/repos/angular/angular-cli/issues/12086/events","html_url":"https://github.com/angular/angular-cli/issues/12086","id":357003825,"node_id":"MDU6SXNzdWUzNTcwMDM4MjU=","number":12086,"title":"SchematicTestRunner.callRule does not use the logger by default","user":{"login":"alexeagle","id":47395,"node_id":"MDQ6VXNlcjQ3Mzk1","avatar_url":"https://avatars2.githubusercontent.com/u/47395?v=4","gravatar_id":"","url":"https://api.github.com/users/alexeagle","html_url":"https://github.com/alexeagle","followers_url":"https://api.github.com/users/alexeagle/followers","following_url":"https://api.github.com/users/alexeagle/following{/other_user}","gists_url":"https://api.github.com/users/alexeagle/gists{/gist_id}","starred_url":"https://api.github.com/users/alexeagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexeagle/subscriptions","organizations_url":"https://api.github.com/users/alexeagle/orgs","repos_url":"https://api.github.com/users/alexeagle/repos","events_url":"https://api.github.com/users/alexeagle/events{/privacy}","received_events_url":"https://api.github.com/users/alexeagle/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-04T22:49:12Z","updated_at":"2018-09-04T22:51:05Z","closed_at":"2018-09-04T22:51:05Z","author_association":"COLLABORATOR","body":"_From @FrozenPandaz on June 6, 2018 3:12_\n\n### Bug Report or Feature Request (mark with an `x`)\r\n```\r\n- [x] bug report -> please search issues before submitting\r\n- [ ] feature request\r\n```\r\n\r\n### Area\r\n```\r\n- [x] devkit\r\n- [ ] schematics\r\n```\r\n\r\n### Versions\r\n<!--\r\nOutput from: `node --version` and `npm --version`.\r\n  Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra? High Sierra?)\r\n-->\r\nUbuntu\r\n\r\n\r\n### Repro steps\r\n<!--\r\nSimple steps to reproduce this bug.\r\nPlease include: commands run, packages added, related code changes.\r\nA link to a sample repo would help too.\r\n-->\r\n```ts\r\n\r\n    const schematicRunner = new SchematicTestRunner(\r\n      collectionName,\r\n      pathToCollectionJson\r\n    );\r\n    const spy = spyOn(schematicRunner.logger, 'info');\r\n    schematicRunner\r\n      .callRule((host: Tree, context: SchematicContext) => {\r\n        context.logger.info('Hello world!');\r\n      , Tree.empty())\r\n      .subscribe(result => {\r\n        expect(spy).toHaveBeenCalledWith('Hello world!');\r\n      });\r\n```\r\n### The log given by the failure\r\n<!-- Normally this include a stack trace and some more information. -->\r\nExpected spy to have been called 'Hello world!' but was not called.\r\n\r\n### Desired functionality\r\n<!--\r\nWhat would like to see implemented?\r\nWhat is the usecase?\r\n-->\r\nThe SchematicTestRunner logger should be used by default and the test should pass\r\n\r\n### Mention any other details that might be useful\r\n<!-- Please include a link to the repo if this is related to an OSS project. -->\r\nAny unit tests which test rules\n\n_Copied from original issue: angular/devkit#1016_"}}
{"actor":{"display_login":"alexeagle"}}