mercredi 13 février 2019

how does the first snapshot gets evaluated

function sum(a,b) { return a+b;}

it("testing snapshot with sum",()=>{
  expect(sum(1,2)).toMatchSnapshot();
})


how does the above test through error incase the test returns value other than 3 at first snapshot itself. I guess it compares relatively but I am not sure if it can be used where we know what's the exact value gonna be .

Aucun commentaire:

Enregistrer un commentaire