This repository has been archived by the owner on May 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathGruntfile.js
69 lines (62 loc) · 1.59 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
59
60
61
62
63
64
65
66
67
68
69
/*! aXe-grunt-webdriver
* Copyright (c) 2015 Deque Systems, Inc.
*
* Your use of this Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This entire copyright notice must appear in every copy of this file you
* distribute or in any file that contains substantial portions of this source
* code.
*/
'use strict';
module.exports = function(grunt) {
grunt.loadTasks('tasks');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-mocha-cli');
var host = 'http://localhost:' + (grunt.option('port') || 9876);
grunt.initConfig({
connect: {
test: {
options: {
hostname: '0.0.0.0',
port: grunt.option('port') || 9876,
base: ['.']
}
}
},
"axe-webdriver" : {
firefox: {
options: {
threshold: 2
},
urls: [
host + '/test/fixtures/document-language.html',
host + '/test/fixtures/shadow-list.html']
},
chrome: {
options: {
threshold: 2,
browser: 'chrome'
},
urls: [
host + '/test/fixtures/document-language.html',
host + '/test/fixtures/shadow-list.html'
],
dest: 'tmp/gu.json'
}
},
mochacli: {
options: {
require: ['should'],
reporter: 'spec',
bail: true
},
all: ['test/**/*.js']
}
});
grunt.registerTask('example', ['connect', 'axe-webdriver']);
grunt.registerTask('test', ['connect', 'axe-webdriver:chrome', 'mochacli']);
// By default, lint and run all tests.
grunt.registerTask('default', ['test']);
};