chrismejia / intro-to-code-js

A repo meant new JS learners help with guided topic-centered practice problems
0 stars 5 forks source link

[Update Exercise] Change all testing instances of to.eql() to to.deep.equal() #74

Closed chrismejia closed 5 days ago

chrismejia commented 1 month ago

What needs to be updated/changed? Why?

to.deep.equal() is more explicit and potentially more readable to those who might not be familiar with to.eql().

Sample Changes

const obj1 = { a: 1, b: { c: 2 } };
const obj2 = { a: 1, b: { c: 2 } };

expect(obj1).to.deep.equal(obj2); 
// would become
expect(obj1).to.eql(obj2); // Passes
chrismejia commented 5 days ago

92