-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
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?