Skip to content

Instantly share code, notes, and snippets.

@takethefake
Last active January 22, 2019 08:02
Show Gist options
  • Save takethefake/1c925625a3b9adf7035ac009318176e2 to your computer and use it in GitHub Desktop.
Save takethefake/1c925625a3b9adf7035ac009318176e2 to your computer and use it in GitHub Desktop.
Medium: Simple sum test
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