-
Notifications
You must be signed in to change notification settings - Fork 371
/
Gruntfile.js
43 lines (38 loc) · 1.08 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
'use strict'
var helper = require('./test/helper')
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
mocha_phantomjs: {
all: ['test/browser/**/*.html']
},
connect: {
server: {
options: {
port: 8000,
base: '.'
},
target: {
options: {
keepalive: false
}
}
}
}
})
// Load the plugins
grunt.loadNpmTasks('grunt-mocha-phantomjs')
grunt.loadNpmTasks('grunt-contrib-connect')
// Configure tasks
grunt.registerTask('default', ['test'])
grunt.registerTask('integration-test', ['test'])
grunt.registerTask('browser-test', ['connect', 'prosody-start', 'mocha_phantomjs', 'prosody-stop'])
grunt.registerTask('full-test', ['test', 'integration-test', 'browser-test'])
grunt.registerTask('dev', ['connect'])
grunt.registerTask('prosody-start', 'Start Prosody', function () {
helper.startServer(this.async())
})
grunt.registerTask('prosody-stop', 'Stop Prosody', function () {
helper.stopServer(this.async())
})
}