Hi Team,
I cannot pass tests on ’ Use the Double Equals to Assert Equality’ challenge. Tests results return as:
// running tests
expected 'failed' to equal 'passed'
== compares object references
// tests completed
My solution is
suite('Equality', function() {
/** 5 - .equal(), .notEqual() **/
// .equal() compares objects using '=='
test('#equal, #notEqual', function(){
//assert.fail( 12, '12', 'numbers are coerced into strings with == ');
//assert.fail( {value: 1}, {value:1}, '== compares object references');
//assert.fail( 6 * '2', '12', 'no more hints...');
//assert.fail( 6 + '2', '12', 'type your error message if you want' );
assert.equal(12 == '12', 'should be converted');
assert.equal({ value: 1}, {value: 1}, '== compares object references');
assert.equal(6 * '2' == '12', 'no more hints...');
assert.notEqual(6 + '2', '12', 'type your error message if you want');
});
Please help.
Thanks,