Skip to content

Commit

Permalink
run ci tests against all supported versions of ember
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Otte-Witte committed Feb 26, 2014
1 parent 7b25293 commit 061b6da
Show file tree
Hide file tree
Showing 15 changed files with 264,817 additions and 12 deletions.
35 changes: 33 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ module.exports = function(grunt) {
'jshint',
'build_tests',
'connect:dev',
'qunit'
'qunit:default'
]);

this.registerTask('ci', 'Executes the tests on the ci server', [
'jshint',
'build_tests',
'connect:dev',
'qunit:ci'
]);

this.registerTask('docs', 'Builds the documentation', [
Expand Down Expand Up @@ -192,12 +199,36 @@ module.exports = function(grunt) {
clean: ['dist', 'tmp', 'docs/build'],

qunit: {
all: {
default: {
options: {
urls: [
'http://localhost:8000/test/index.html'
]
}
},
ci: {
options: {
urls: function() {
return [
'ember=1.2.0&jQuery=1.10.1',
'ember=1.2.1&jQuery=1.10.1',
'ember=1.2.2&jQuery=1.10.1',
'ember=1.3.0&jQuery=1.10.1',
'ember=1.3.1&jQuery=1.10.1',
'ember=1.3.2&jQuery=1.10.1',
'ember=1.2.0&jQuery=2.0.2',
'ember=1.2.1&jQuery=2.0.2',
'ember=1.2.2&jQuery=2.0.2',
'ember=1.3.0&jQuery=2.0.2',
'ember=1.3.1&jQuery=2.0.2',
'ember=1.3.2&jQuery=2.0.2',
'ember=1.4.0&jQuery=1.11.0',
'ember=1.4.0&jQuery=2.1.0'
].map(function(bundle) {
return ('http://localhost:8000/test/index.html?' + bundle);
});
}()
}
}
},

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"marked": "~0.3.1"
},
"scripts": {
"test": "./node_modules/grunt-cli/bin/grunt test"
"test": "./node_modules/grunt-cli/bin/grunt ci"
}
}
4 changes: 1 addition & 3 deletions test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
<div id="qunit-fixture"></div>
<script src="vendor/qunit.js"></script>
<script src="../vendor/loader.js"></script>
<script src="vendor/jquery.js"></script>
<script src="vendor/handlebars.js"></script>
<script src="vendor/ember.js"></script>
<script src="lib/dependencies_loader.js"></script>
<script src="../tmp/ember-simple-auth.amd.js"></script>
<script src="../tmp/ember-simple-auth-tests.amd.js"></script>
<script type="text/javascript">
Expand Down
14 changes: 14 additions & 0 deletions test/lib/dependencies_loader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(function() {
function parseVersion(dependency) {
var regexp = new RegExp('[?&]' + dependency + '=(.*?)(?=&|$)');
return (window.location.search.match(regexp) || [])[1];
}

var jQueryVersion = parseVersion('jQuery') || '2.1.0';
var handlebarsVersion = parseVersion('handlebars') || '1.3.0';
var emberVersion = parseVersion('ember') || '1.4.0';

document.write('<script src="vendor/jquery-' + jQueryVersion + '.js"></script>');
document.write('<script src="vendor/handlebars.js"></script>');
document.write('<script src="vendor/ember-' + emberVersion + '.js"></script>');
})();
Loading

0 comments on commit 061b6da

Please sign in to comment.