Skip to content

Event Emitter test might not be working as expected #31

@rjmccluskey

Description

@rjmccluskey

https://github.com/thelgevold/angular-2-samples/blob/master/unit-test-scenarios/event-emitter/event-emitter-spec.ts

I was using the example you have on testing an EventEmitter and I discovered that my test was passing because the test runner could not find an expectation. Try changing the expect inside the subscription to be something you know will fail (like expect false to equal true) and your test might still come back that it passed.

Maybe I just have something setup incorrectly so I'm sorry if I'm wrong about this but I just wanted to give you a warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions