Created
May 26, 2017 14:32
-
-
Save rflpazini/4327dad243a5ca27aed1a472f33663c3 to your computer and use it in GitHub Desktop.
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
describe('Calculadora', function() { | |
var calculadora, | |
a, | |
b; | |
//Inicia as variáveis antes de executar qualquer rotina de teste | |
beforeEach(function() { | |
calculadora = new Calculadora(); | |
a = 5; | |
b = 6; | |
}); | |
//Teste que verificará se nosso método está retornando a soma correta | |
it('deve somar DOIS números', function() { | |
expect(calculadora.soma(a, b)).toEqual(a + b); | |
}); | |
//Teste de soma de números flutuantes | |
it('deve somos DOIS números FLUTUANTES', function() { | |
expect(calculadora.soma(0.1, 0.2)).toEqual(0.3); | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment