Skip to content

Instantly share code, notes, and snippets.

@pejalo
Created August 10, 2023 03:12
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 pejalo/4ac3d75e0ef663199743c263152c2be6 to your computer and use it in GitHub Desktop.
Save pejalo/4ac3d75e0ef663199743c263152c2be6 to your computer and use it in GitHub Desktop.
mocha tests in browser
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>My Tests</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=">
<link rel="stylesheet" href="node_modules/mocha/mocha.css" />
<script type="module" src="node_modules/mocha/mocha.js"></script>
<script type="module">
mocha.setup({ ui: 'bdd', globals: ['currentDateTime'] })
</script>
<script type="module" src="sdk.test.js"></script>
<script type="module">
mocha.checkLeaks();
mocha.run();
</script>
</head>
<body>
<div id="mocha"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment