In this question, you need to replicate the popular testing library
jest functionality. You must implement the utility
expect provided by the
// Syntax customExpect(actual).toBe(expected); customExpect(actual).not.toBe(expected); customExpect(3).toBe(3); // no error | Do not return anything customExpect(2).toBe(3); // should throw an error customExpect(2).not.toBe(3); // no error | Do not return anything customExpect(2).not.toBe(2); // should throw an error
customExpect function should support the functionality of
P.S. We have provided a stopwatch timer at the top. Start the timer when you are about to try this question and try to finish within 15-20 mins.
Once you are successfully done with this then try to implement more methods from
jest. Find full list here: https://jestjs.io/docs/expect