include HTML test

This commit is contained in:
guybedford
2014-02-11 17:06:33 +02:00
parent 516a097b18
commit e5408be843
4 changed files with 16 additions and 3 deletions
+3 -1
View File
@@ -7,6 +7,7 @@ System.paths['tests/*'] = 'tests/*.js';
System.map = {
'mocha': 'npm:mocha@^1.17.1',
'angular': 'github:angular/bower-angular@^1.2.12',
'text': 'github:systemjs/plugin-text@master',
'npm:mocha@1.17.1': {
'css': 'github:systemjs/plugin-css@master'
}
@@ -15,6 +16,7 @@ System.map = {
System.versions = {
'github:angular/bower-angular': '1.2.12',
'npm:mocha': '1.17.1',
'github:systemjs/plugin-css': 'master'
'github:systemjs/plugin-css': 'master',
'github:systemjs/plugin-text': 'master'
};
+2 -1
View File
@@ -8,6 +8,7 @@
"registry": "jspm",
"dependencies": {
"mocha": "^1.17.1",
"angular": "^1.2.12"
"angular": "^1.2.12",
"text": "master"
}
}
+1
View File
@@ -0,0 +1 @@
<h1>This is an HTML test</h1>
+10 -1
View File
@@ -1,3 +1,4 @@
var someHTML = require('./angular.html!text');
exports['load test'] = function(done) {
System.import('angular').then(function() {
@@ -7,8 +8,16 @@ exports['load test'] = function(done) {
exports['another test'] = function(done) {
System.import('angular').then(function(angular) {
document.querySelector("#sandbox").innerHTML = someHTML;
if (!angular)
throw 'Test failed...';
done();
setTimeout(done, 1000);
});
}
exports['last test'] = function(done) {
done();
}