Skip to content

Show power-assert style errors in error summary #689

@Qix-

Description

@Qix-

Trying to get t.same() to work.

The test line I have is

t.same(cc.rgb(), {color: {model: 'rgb', value: [0, 0, 0, 1]}});

Seems fairly straightforward.

Here is the output.

  ✖ models › rgb
  t.same(cc.rgb(), { color: { model: 'rgb', value: [0, 0, 0, 1] } })
            |
            Object{color:Object{model:"rgb",value:[0,0,0,1]}}


  1 test failed

  1. models › rgb
  AssertionError: {} === { color: { model: 'rgb', value: [ 0, 0, 0, 1 ] } }
    Test.fn (models.js:6:4)
    handleMessage (child_process.js:322:10)
    Pipe.channel.onread (child_process.js:349:11)


npm ERR! Test failed.  See above for more details.

Are these not the same objects?

{ color: { model: 'rgb', value: [0, 0, 0, 1] } }

and

Object{color:Object{model:"rgb",value:[0,0,0,1]}}

?

As well, what's up with this?

AssertionError: {} === { color: { model: 'rgb', value: [ 0, 0, 0, 1 ] } }

What's going on here?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions