angular test
This commit is contained in:
+15
-3
@@ -2,12 +2,24 @@
|
|||||||
<script src="jspm_packages/system@0.4.1.js"></script>
|
<script src="jspm_packages/system@0.4.1.js"></script>
|
||||||
<script src="config.js"></script>
|
<script src="config.js"></script>
|
||||||
|
|
||||||
<body><div id="mocha"></div></body>
|
<body>
|
||||||
|
<div id="mocha"></div>
|
||||||
|
<div id="sandbox"></div>
|
||||||
|
</body>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
System.import('mocha').then(function(mocha) {
|
System.import('mocha').then(function(mocha) {
|
||||||
mocha.setup('tdd');
|
System.import('tests/tests').then(function(suites) {
|
||||||
System.import('tests/tests').then(function() {
|
mocha.setup('tdd');
|
||||||
|
for (var s in suites) {
|
||||||
|
suite(s, function() {
|
||||||
|
setup(function() {
|
||||||
|
document.querySelector("#sandbox").innerHTML = '';
|
||||||
|
});
|
||||||
|
for (var t in suites[s])
|
||||||
|
test(t, suites[s][t]);
|
||||||
|
});
|
||||||
|
}
|
||||||
mocha.run();
|
mocha.run();
|
||||||
})
|
})
|
||||||
.catch(function(e) {
|
.catch(function(e) {
|
||||||
|
|||||||
Vendored
+13
-6
@@ -1,7 +1,14 @@
|
|||||||
suite('Angular', function() {
|
|
||||||
test('load', function(done) {
|
exports['load test'] = function(done) {
|
||||||
System.import('angular').then(function() {
|
System.import('angular').then(function() {
|
||||||
done();
|
done();
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
|
exports['another test'] = function(done) {
|
||||||
|
System.import('angular').then(function(angular) {
|
||||||
|
if (!angular)
|
||||||
|
throw 'Test failed...';
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
}
|
||||||
+2
-3
@@ -1,3 +1,2 @@
|
|||||||
suite('Angular', function() {
|
|
||||||
require('tests/angular');
|
exports['Angular'] = require('tests/angular');
|
||||||
});
|
|
||||||
|
|||||||
Reference in New Issue
Block a user