Last active
October 18, 2017 19:39
-
-
Save lai32290/99f07cc4060d03c7724c69f1fbe9c53e to your computer and use it in GitHub Desktop.
Javascript Unit Test Quick Guide - functionReturnSpec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { sum } from "./myMathLib.js"; | |
describe("Testando retorno da funcao", () => { | |
it("deve retornar a soma dos valores 1 e 2", () => { | |
const result = sum(1, 2); // pegando resultado da soma de 1 e 2 | |
expect(result).toEqual(3); // verificar se o resultado retornado é igual a 3 | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment