Last active
August 21, 2022 06:51
-
-
Save werterzz/5f58c71b31a368b58d2ed52dea36a3bc 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) => { // cover | |
if (answer === true) return "you like dogs." // cover | |
else if (answer === false) return "you don't like dogs." // cover | |
else return "you didn't answer my question." // not cover | |
} // cover | |
//----------------------------------- | |
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