From e5408be843509e525fe5f6fb2ea7f911a62b1b4f Mon Sep 17 00:00:00 2001 From: guybedford Date: Tue, 11 Feb 2014 17:06:33 +0200 Subject: [PATCH] include HTML test --- test/config.js | 4 +++- test/package.json | 3 ++- test/tests/angular.html | 1 + test/tests/angular.js | 11 ++++++++++- 4 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 test/tests/angular.html diff --git a/test/config.js b/test/config.js index e65f790..dbdda6f 100644 --- a/test/config.js +++ b/test/config.js @@ -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' }; diff --git a/test/package.json b/test/package.json index a14d42b..7b83c59 100644 --- a/test/package.json +++ b/test/package.json @@ -8,6 +8,7 @@ "registry": "jspm", "dependencies": { "mocha": "^1.17.1", - "angular": "^1.2.12" + "angular": "^1.2.12", + "text": "master" } } \ No newline at end of file diff --git a/test/tests/angular.html b/test/tests/angular.html new file mode 100644 index 0000000..417cabc --- /dev/null +++ b/test/tests/angular.html @@ -0,0 +1 @@ +

This is an HTML test

\ No newline at end of file diff --git a/test/tests/angular.js b/test/tests/angular.js index 71f3854..c10fd66 100644 --- a/test/tests/angular.js +++ b/test/tests/angular.js @@ -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(); } \ No newline at end of file