Skip to content

Instantly share code, notes, and snippets.

Created August 8, 2017 14:47
Show Gist options
  • Save anonymous/452f8c6f950d1004cff379ad2dc6ad39 to your computer and use it in GitHub Desktop.
Save anonymous/452f8c6f950d1004cff379ad2dc6ad39 to your computer and use it in GitHub Desktop.
Mocha Testing via PolyGit Browser testing with Mocha and Chai loaded through PolyGit // source https://jsbin.com/felaqoq
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta name="description" content="Browser testing with Mocha and Chai loaded through PolyGit">
<title>Mocha Testing via PolyGit</title>
</head>
<body>
<script src="https://polygit2.appspot.com/components/webcomponentsjs/webcomponents-lite.js"></script>
<base href="https://polygit2.appspot.com/mocha+mochajs+*/components/">
<link rel="stylesheet" href="mocha/mocha.css">
<script src="mocha/mocha.js"></script>
<script src="chai/chai.js"></script>
<div id="mocha"></div>
<script id="jsbin-javascript">
mocha.setup("bdd");
const should = chai.should();
it("runs", () => {
(1).should.equal(1);
});
mocha.run();
</script>
<script id="jsbin-source-javascript" type="text/javascript">mocha.setup("bdd");
const should = chai.should();
it("runs", () => {
(1).should.equal(1);
});
mocha.run();</script></body>
</html>
mocha.setup("bdd");
const should = chai.should();
it("runs", () => {
(1).should.equal(1);
});
mocha.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment