161. toBe() or not.toBe()

JavaScript
Is this helpful ?

medium  - accepted / - tried

Here are some simple Jest test code.

expect(3).toBe(3) // ✅
expect(4).toBe(3) // ❌

We can reverse it with not.

expect(3).not.toBe(3) // ❌
expect(4).not.toBe(3) // ✅

Please implement myExpect() to support toBe() and also not.

Let's try to solve this problem within 10 mintues.

Discuss(19)