A Pen by Wayne Wang on CodePen.
Created
July 28, 2020 16:44
-
-
Save atwayne/fdb75017f337fbae4e0df22ca56578ce to your computer and use it in GitHub Desktop.
Mocha Unit Test Template
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
<div id="mocha"></div> | |
<hr /> | |
<div id="counterTest"></div> |
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
mocha.setup("bdd"); | |
const assert = chai.assert; | |
describe("default group", function () { | |
it("should work", function () {}); | |
}); | |
mocha.run(); |
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
<script src="https://cdnjs.cloudflare.com/ajax/libs/mocha/8.0.1/mocha.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/sinon.js/9.0.2/sinon.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/chai/4.2.0/chai.min.js"></script> |
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
<link href="https://cdnjs.cloudflare.com/ajax/libs/mocha/8.0.1/mocha.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment