161. toBe() or not.toBe()

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.

Think aloud!

(1)
(147)