-
-
Save lborgav/6405da6487552b11f437 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| .pass:before { | |
| content: 'PASS: '; | |
| color: blue; | |
| font-weight: bold; | |
| } | |
| .fail:before { | |
| content: 'FAIL: '; | |
| color: red; | |
| font-weight: bold; | |
| } |
This file contains hidden or 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
| var output = document.getElementById('output'); | |
| function assert( outcome, description ) { | |
| var li = document.createElement('li'); | |
| li.className = outcome ? 'pass' : 'fail'; | |
| li.appendChild( document.createTextNode( description ) ); | |
| output.appendChild(li); | |
| }; |
This file contains hidden or 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
| <!DOCTYPE HTML> | |
| <html lang="en-US"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Easy JavaScript Testing </title> | |
| <style> | |
| .pass:before { | |
| content: 'PASS: '; | |
| color: blue; | |
| font-weight: bold; | |
| } | |
| .fail:before { | |
| content: 'FAIL: '; | |
| color: red; | |
| font-weight: bold; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <ul id="output"></ul> | |
| <script> | |
| var output = document.getElementById('output'); | |
| function assert( outcome, description ) { | |
| var li = document.createElement('li'); | |
| li.className = outcome ? 'pass' : 'fail'; | |
| li.appendChild( document.createTextNode( description ) ); | |
| output.appendChild(li); | |
| }; | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment