Advertisement
Lulunga

Unit Testing 02. Even Or Odd

Oct 21st, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. describe("isOddOrEven", () => {
  2.  
  3.     it("Passing number as a parameter => undefined ", () => {
  4.         expect(isOddOrEven(2)).to.equal(undefined, "Function did nt return the correct result!");
  5.     });
  6.     it("Passing object as a parameter => undefined ", () => {
  7.         expect(isOddOrEven({ name: 'Zarine' })).to.equal(undefined, "Function did nt return the correct result!");
  8.     });
  9.  
  10.     it("Passing  even string => even ", () => {
  11.         expect(isOddOrEven('toni')).to.equal("even", "Function did nt return the correct result!");
  12.     });
  13.  
  14.     it("Passing  odd string => odd ", () => {
  15.         expect(isOddOrEven('ton')).to.equal("odd", "Function did nt return the correct result!");
  16.     });
  17. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement