manojjsm / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
2 stars 0 forks source link

assertEquals is incorrect when comparing objects which have null properties #400

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Inside jsTestDriver, run assertEquals({foo: null}, {bar:null})

What is the expected output? What do you see instead?
expected output indicating the objects are not equal. Actually get the result 
"true"

What version of the product are you using? On what operating system?
jsTestDriver 1.35, OSX 10.6.8, Chrome 22.0.1229.94

Please provide any additional information below.

This is because compare_() in Asserts.js is using == instead of ===  on line 
173. Using === fixes the issue.

Original issue reported on code.google.com by mgr...@rallydev.com on 18 Oct 2012 at 10:28