UNPKG

extend-with-super

Version:

Extend object literals with function properties to have a _super method that references the original function, instead of overwriting it. (No dependencies, but borrowed methods from underscore.js.)

39 lines (34 loc) 1.27 kB
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title>Example Mocha Test</title> <link rel="stylesheet" href="mocha/mocha.css" type="text/css" charset="utf-8" /> </head> <body> <!-- Required for browser reporter --> <div id="mocha"></div> <!-- mocha --> <script src="mocha/mocha.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript" charset="utf-8"> // This will be overridden by mocha-helper if you run with grunt mocha.setup('bdd'); </script> <!-- Include your assertion lib of choice --> <script src="chai/chai.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript" charset="utf-8"> // Setup chai var expect = chai.expect; </script> <!-- Include anything you want to test --> <script src="extend-with-super.js" type="text/javascript" charset="utf-8"></script> <script src="../shared/extend-with-super-isomorphic-test.js" type="text/javascript" charset="utf-8"></script> <!-- run mocha after all test are loaded --> <script type="text/javascript" charset="utf-8"> // Only tests run in real browser, injected script run if options.run == true if (navigator.userAgent.indexOf('PhantomJS') < 0) { mocha.run(); } </script> </body> </html>