Skip to content

Tests written with nodeunit-dsl seem to always fail #1

Description

@abraao

The method assertionList in nodeunit's type.js has redefined "failures" in its return object as a function rather than a property with a getter. This causes every test written with nodeunit-dsl to seem failed, with the body of said function rendered as the number of failed assertions. Rather than simply accessing assertions.failures, the code should check if it's a function first, and if so, execute it.

The previous version of assertionList defined "failures" as a function that was automatically executed when accessed by using defineGetter . This was changed by caolan on Nov 18, 2010 in favor of the current implementation because getters are not supported by all browsers.

I will submit a pull request with a fix for this issue shortly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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