-
Notifications
You must be signed in to change notification settings - Fork 307
Using Intern with Grunt
vladikoff edited this page Apr 30, 2013
·
14 revisions
Grunt support is built into Intern. Install Intern and load the Grunt task into your Gruntfile
using grunt.loadTasks('path/to/intern/grunt');
.
An example of the Grunt Intern task is available in the intern-examples repository.
Name Default |
Description |
---|---|
runType client |
Example: "runner" or "client"
|
config |
Example: "intern-selftest/tests/selftest.intern.js"
|
reporters |
Example: ['console', 'lcov']
|
suites |
Example: ['intern-selftest/tests/all']
|
proxyOnly |
Example: true
|
autoRun |
Example: true
|
grunt.initConfig({
intern: {
someReleaseTarget: {
runType: 'runner', // defaults to client,
options: {
config: "intern-selftest/tests/selftest.intern.js",
reporters: ['console', 'lcov'],
suites: ['intern-selftest/tests/all'],
proxyOnly: true,
autoRun: true
}
},
anotherReleaseTarget: { ... }
}
});
grunt.initConfig({
intern: {
local: {
options: {
teststackDir: './intern',
config: 'tests/intern.js'
}
}
}
});
// Load the Intern task
grunt.loadTasks('./intern/grunt');
// Register a test task
grunt.registerTask('test', ['intern']);
// By default we just test
grunt.registerTask('default', ['test']);