systemjs
Version:
System loader extension for flexible AMD & CommonJS support
57 lines (46 loc) • 1.66 kB
HTML
<html>
<head>
<link rel="stylesheet" type="text/css" href="../bower_components/qunit/qunit/qunit.css"/>
</head>
<body>
<h1 id="qunit-header">SystemJS Test Suite</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="qunit-test-area"></div>
<!-- <script src="../bower_components/traceur/traceur.js"></script> -->
<script src="../bower_components/es6-module-loader/dist/es6-module-loader.js"></script>
<script src="../lib/extension-register.js"></script>
<script>
// apply system.register extension (note normally we do this in closure to not have 'register' global)
register(System);
</script>
<!-- <script src="https://cdn.rawgit.com/systemjs/register/master/es6-module-loader-register.js"></script> -->
<script src="../bower_components/qunit/qunit/qunit.js"></script>
<script>
QUnit.config.testTimeout = 2000;
QUnit.module("SystemJS Tracer");
function err(e) {
setTimeout(function() {
throw e;
start();
});
}
asyncTest('System.register Circular', function() {
System['import']('tests/register-circular1').then(function(m) {
ok(m.q == 3, 'Binding not allocated');
ok(m.r == 5, 'Binding not updated');
start();
}, err);
});
asyncTest('Loading a module with the same name', function() {
System['import']('tests/foo').then(function(m) {
ok(m.f == 'f');
start();
}, err);
});
</script>
</body>
</html>