Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8"/>
- <title>TDD Project - Steve Doig</title>
- <style>
- #container {width: 600px; max-width: 100%; margin: 1em auto;}
- </style>
- <link rel="stylesheet" href="../node_modules/mocha/mocha.css">
- </head>
- <body>
- <div id="container">
- <form id="dataForm" onsubmit="return runTest()">
- <input type="text" id="text" placeholder="enter some text" required maxlength="10" pattern="^[a-z,A-Z]{1,10}$"><br />
- <input type="text" id="number" placeholder="enter a number" required maxlength="10" pattern="\d{10}"><br />
- <button id="submitTest">Submit</button>
- </form>
- </div>
- <script>
- document.getElementById("dataForm").submit();
- </script>
- <div id="mocha"></div>
- <script src="../node_modules/mocha/mocha.js"></script>
- <script src="../node_modules/chai/chai.js"></script>
- <script>mocha.setup('bdd')</script>
- <script src="../test/test2.js"></script>
- <script>
- mocha.run();
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement