Last active
January 22, 2019 08:02
-
-
Save takethefake/1c925625a3b9adf7035ac009318176e2 to your computer and use it in GitHub Desktop.
Medium: Simple sum test
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
export const sum = (x: number, y: number) => x + y; | |
test("it should add two numbers", () => { | |
// Arrange | |
const expected = 7; | |
// Act | |
const actual = sum(3, 4); | |
// Assert | |
expect(actual).toBe(expected); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment