Skip to content

Failure message to handle non-simple types #30

@Ir0nClad

Description

@Ir0nClad

Assuming that there is a method called getItem that returns a reference to the object in the provided array:

assertThat( [{id: "1"}, {id: "2"}], allOf( hasItem( getItem("1") ), hasItem( getItem("9") ) ) );

Currently, an error message is provided:
Error: Expected: (an Array containing <[object Object]> and an Array containing null)
but: an Array containing null was [<[object Object]>,<[object Object]>]

I'm not sure that mx.utils.ObjectUtil::toString() is the correct fix here as the text is spread over multiple lines with appropriate indentions, but it would be nice to see something other than <[object Object]>.

The test case usage may be bad, but I would like to see something like <{id: "1"}> in stead of <[object Object]>

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