registry tests

This commit is contained in:
guybedford
2014-02-15 19:54:56 +02:00
parent ca5d8df404
commit aaf1a2cfc8
9 changed files with 65 additions and 23 deletions
+5
View File
@@ -0,0 +1,5 @@
{
"directories": {
"dist": "dist"
}
}
+10 -3
View File
@@ -1,19 +1,26 @@
System.paths['tests/*'] = 'tests/*.js';
System.paths['npm:*'] = 'jspm_packages/npm/*.js';
System.paths['github:*'] = 'jspm_packages/github/*.js';
System.map = {
'text': 'github:systemjs/plugin-text@master',
'angular': 'github:angular/bower-angular@^1.2.12',
'mocha': 'npm:mocha@^1.17.1',
'text': 'github:systemjs/plugin-text@master',
'bootstrap': 'github:twbs/bootstrap@^3.1.1',
'jquery': 'github:components/jquery@^2.1.0',
'css': 'github:systemjs/plugin-css@master',
'npm:mocha@1.17.1': {
'css': 'github:systemjs/plugin-css@master'
}
};
System.versions = {
'github:systemjs/plugin-text': 'master',
'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',
'github:twbs/bootstrap': '3.1.1',
'github:components/jquery': '2.1.0'
};
+5 -2
View File
@@ -7,8 +7,11 @@
"configFile": "config.js",
"registry": "jspm",
"dependencies": {
"text": "master",
"angular": "^1.2.12",
"mocha": "^1.17.1"
"mocha": "^1.17.1",
"text": "master",
"bootstrap": "^3.1.1",
"jquery": "^2.1.0",
"css": "master"
}
}
+2 -1
View File
@@ -1,5 +1,6 @@
<!doctype html>
<script src="jspm_packages/system@0.4.js"></script>
<script src="../../es6-module-loader/lib/es6-module-loader.js"></script>
<script src="../../systemjs/dist/system.js"></script>
<script src="config.js"></script>
<body>
-16
View File
@@ -4,20 +4,4 @@ exports['load test'] = function(done) {
System.import('angular').then(function() {
done();
});
}
exports['another test'] = function(done) {
System.import('angular').then(function(angular) {
document.querySelector("#sandbox").innerHTML = someHTML;
if (!angular)
throw 'Test failed...';
setTimeout(done, 1000);
});
}
exports['last test'] = function(done) {
done();
}
+23
View File
@@ -0,0 +1,23 @@
<!-- Button trigger modal -->
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
Launch demo modal
</button>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
+11
View File
@@ -0,0 +1,11 @@
var $ = require('bootstrap');
require('bootstrap/css/bootstrap.css!');
var template = require('./bootstrap.html!text');
exports['modal test'] = function(done) {
$("#sandbox").html(template);
$('#myModal').on('shown.bs.modal', function() {
done();
});
$('#sandbox .btn').click();
}
+6
View File
@@ -0,0 +1,6 @@
var $ = require('jquery');
exports['simple test'] = function(done) {
$('#sandbox').html('jquery');
done();
}
+3 -1
View File
@@ -1,2 +1,4 @@
exports['Angular'] = require('tests/angular');
// exports['Angular'] = require('tests/angular');
exports['Bootstrap'] = require('tests/bootstrap');
exports['jQuery'] = require('tests/jquery');