Expected value | Actual value | Result |
---|---|---|
${_} |
Tests running #{coffee.inline} window.checkAnswers = -> # See if the test passed. num_tests = $('#test-table tr').length - 1 $('#num-tests').text num_tests + ' tests found.' passed = true for i in [1..num_tests] r = $('#expected-' + i).text == $('#actual-' + i).text result_string = if r then 'Passed' else 'Failed' $('#result-' + i).text result_string console.log 'Test ' + i + ' ' + result_string passed &= r $('#result').text (if passed then 'All tests passed' else 'Failure') #{/}