Skip to content

Instantly share code, notes, and snippets.

@jonfriskics
Last active September 9, 2019 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonfriskics/384cb7713eec937857fdad07722eb48f to your computer and use it in GitHub Desktop.
Save jonfriskics/384cb7713eec937857fdad07722eb48f to your computer and use it in GitHub Desktop.
Example Mocha.js Test
describe("QuizQuestion.js", () => {
it("should have a method named handleClick with the correct parameter @quiz-question-should-have-handle-click", () => {
assert("CONDITION CHECKING IF HANDLECLICK EXISTS", "`QuizQuestion.js` does not contain a method named `handleClick`")
assert("CONDITION CHECKING HANDLECLICK PARAMETER", "`QuizQuestion.js does not have the method named `handleClick` with a parameter named `buttonText`")
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment