m8
Version:
m8 is a small utility library you might find useful or just plain annoying.
48 lines (42 loc) • 1.13 kB
HTML
<html lang="en-GB">
<head>
<meta charset="UTF-8" />
<title>m8.test</title>
<link href="../../node_modules/mocha/mocha.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="mocha"></div>
<script src="../../node_modules/mocha/mocha.js" type="text/javascript"></script>
<script src="../../node_modules/chai/chai.js" type="text/javascript"></script>
<script src="require.js" type="text/javascript"></script>
<script type="text/javascript">
mocha.setup( {
ignoreLeaks : true,
ui : 'tdd'
} );
require.config( {
paths : {
m8 : '../m8',
test : 'm8.test'
},
shim : {
id8 : { deps : ['m8'] },
test : { deps : ['m8'] }
}
} );
</script>
<script type="text/javascript">
require( ['m8', 'id8', 'test'], function( mate, ideate ) {
suite( 'testing AMD\'ish compliance', function() {
test( '<static> m8.expose', function( done ) {
chai.expect( mate ).to.equal( m8 );
chai.expect( ideate ).to.equal( id8 );
done();
} );
} );
mocha.run();
} );
</script>
</body>
</html>