-
Notifications
You must be signed in to change notification settings - Fork 514
/
Gruntfile.js
58 lines (50 loc) · 1.39 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
'use strict';
module.exports = function(grunt) {
var HTTPD_PORT = 28080 + Math.floor(Math.random() * 10);
var TEST_URL = 'http://localhost:' + HTTPD_PORT + '/test/';
var BASE_COMMIT = grunt.option('base-commit') ||
'';
grunt.initConfig({
shell: {
'qunit-slimerjs': {
command: './test/run-slimerjs.sh ' + TEST_URL + '?allownoref=true',
options: {
stdout: true,
stderr: true,
failOnError: true,
execOptions: {
maxBuffer: Infinity
}
}
},
'compare-slimerjs': {
command: './test/run-slimerjs-compare.sh ' +
TEST_URL + ' ' + BASE_COMMIT,
options: {
stdout: true,
stderr: true,
failOnError: true,
execOptions: {
maxBuffer: Infinity
}
}
}
},
connect: {
test: {
options: {
port: HTTPD_PORT
}
}
}
});
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.registerTask('test', ['test-slimerjs']);
grunt.registerTask('compare', ['compare-slimerjs']);
// Run the test suite with QUnit on SlimerJS
grunt.registerTask('test-slimerjs', ['connect', 'shell:qunit-slimerjs']);
// Run the test suite with QUnit on SlimerJS
grunt.registerTask('compare-slimerjs',
['connect', 'shell:compare-slimerjs']);
};