Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

SchematicTestRunner.callRule does not use the logger by default #12087

Copy link
Copy link
@alexeagle

Description

@alexeagle
Issue body actions

From @FrozenPandaz on June 6, 2018 3:12

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Area

- [x] devkit
- [ ] schematics

Versions

Ubuntu

Repro steps

    const schematicRunner = new SchematicTestRunner(
      collectionName,
      pathToCollectionJson
    );
    const spy = spyOn(schematicRunner.logger, 'info');
    schematicRunner
      .callRule((host: Tree, context: SchematicContext) => {
        context.logger.info('Hello world!');
      , Tree.empty())
      .subscribe(result => {
        expect(spy).toHaveBeenCalledWith('Hello world!');
      });

The log given by the failure

Expected spy to have been called 'Hello world!' but was not called.

Desired functionality

The SchematicTestRunner logger should be used by default and the test should pass

Mention any other details that might be useful

Any unit tests which test rules

Copied from original issue: angular/devkit#1016

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.