Advertisement
ErolKZ

Untitled

Feb 9th, 2022
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1.  
  2. describe ('Sum of numbers Calculator', () => {
  3.  
  4.  
  5. // it('Should be an array', () => {
  6.  
  7. // expect().to.be.an('array');
  8.  
  9. // });
  10.  
  11.  
  12. it('Should return the sum', () => {
  13.  
  14. expect(sum([2, 3, 15])).to.be.an('number');
  15.  
  16. });
  17.  
  18.  
  19. it('Should return the correct sum', () => {
  20.  
  21. let expectedSum = 50;
  22.  
  23. let actualSum = sum([10, 15, 20, 5]);
  24.  
  25. expect(expectedSum).to.equal(actualSum);
  26.  
  27. });
  28.  
  29. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement