Skip to content

Test run not failing with broken tests #303

Closed
@lholmquist

Description

@lholmquist

Describe the Bug
While creating the PR for #301, i added a test that should fail the build. It does fail the test, but the test suite still thinks it passes. The error shows up as an unhandled promise rejection: https://github.com/cloudevents/sdk-javascript/pull/302/checks?check_run_id=951373768#step:6:330

Expected Behavior
The expected behavior is that CI should fail

Additional context
This isn't a problem with the library source code. It only happens in tests that are using promises. It could be someting with mocha and how it handles promise rejections. But that is my guess

edit: After doing a little testing, if we just add a return inside the tests, then things break/pass like a normal tets

Metadata

Metadata

Assignees

No one assigned

    Labels

    module/testIssues and changes related to the teststype/bugSomething isn't workingversion/3.xIssues related to the 3.0 release of this library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions