Skip to content

Instantly share code, notes, and snippets.

@n8rzz
Last active October 23, 2021 21:48
Show Gist options
  • Save n8rzz/7055dafaca5c08eafb0fb936785cb3c3 to your computer and use it in GitHub Desktop.
Save n8rzz/7055dafaca5c08eafb0fb936785cb3c3 to your computer and use it in GitHub Desktop.
max.test.ts
describe('.max()', () => {
describe('when `valueOne` is equal to `valueTwo`', () => {
test('should return `valueOne`', () => {
const result = max(1, 1);
expect(result).toEqual(1);
});
});
describe('when `valueOne` is less than `valueTwo`', () => {
test('should return `valueTwo`', () => {
const result = max(1, 2);
expect(result).toEqual(2);
});
});
describe('when `valueOne` is greater than `valueTwo`', () => {
test('should return `valueOne`', () => {
const result = max(3, 2);
expect(result).toEqual(3);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment