Last active
October 23, 2021 21:48
-
-
Save n8rzz/7055dafaca5c08eafb0fb936785cb3c3 to your computer and use it in GitHub Desktop.
max.test.ts
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('.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