Skip to main content
🔮 Output PredictionQA Testing & QA Easy⚡+10 XP

toBe vs toEqual

Which assertion compares object structure?

Testing & QA
expect({a: 1}).toEqual({a: 1}); // passes?
expect({a: 1}).toBe({a: 1});   // passes?

🔮 What is the output?