Created
August 21, 2022 07:39
-
-
Save werterzz/92728283302e01188d4085011cf7e703 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
const doYouLikeDog = (answer) => { | |
return answer === true ? "you like dogs." : answer === false ? "you don't like dogs." : "you didn't answer my question." | |
} | |
test('pass true on doYouLikeDog()', () => { | |
expect(doYouLikeDog(true)).toBe("you like dogs."); | |
}); | |
test('pass false on doYouLikeDog()', () => { | |
expect(doYouLikeDog(false)).toBe("you don't like dogs."); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment