chore(build): rename testacular to karma
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
||||
before_script:
|
||||
- export DISPLAY=:99.0
|
||||
- sh -e /etc/init.d/xvfb start
|
||||
- npm install --quiet -g grunt-cli testacular
|
||||
- npm install --quiet -g grunt-cli karma
|
||||
- npm install
|
||||
|
||||
script: grunt
|
||||
+11
-11
@@ -243,13 +243,13 @@ module.exports = function(grunt) {
|
||||
files.forEach(html2js);
|
||||
});
|
||||
|
||||
// Testacular configuration
|
||||
function runTestacular(command, options) {
|
||||
var testacularCmd = process.platform === 'win32' ? 'testacular.cmd' : 'testacular';
|
||||
// Karma configuration
|
||||
function runKarma(command, options) {
|
||||
var karmaCmd = process.platform === 'win32' ? 'karma.cmd' : 'karma';
|
||||
var args = [command].concat(options);
|
||||
var done = grunt.task.current.async();
|
||||
var child = grunt.util.spawn({
|
||||
cmd: testacularCmd,
|
||||
cmd: karmaCmd,
|
||||
args: args
|
||||
}, function(err, result, code) {
|
||||
if (code) {
|
||||
@@ -270,22 +270,22 @@ module.exports = function(grunt) {
|
||||
//Can augment options with command line arguments
|
||||
options = options.concat(this.args);
|
||||
}
|
||||
runTestacular('start', options);
|
||||
runKarma('start', options);
|
||||
});
|
||||
|
||||
grunt.registerTask('server', 'start testacular server', function() {
|
||||
grunt.registerTask('server', 'start karma server', function() {
|
||||
var options = ['--no-single-run', '--no-auto-watch'].concat(this.args);
|
||||
runTestacular('start', options);
|
||||
runKarma('start', options);
|
||||
});
|
||||
|
||||
grunt.registerTask('test-run', 'run tests against continuous testacular server', function() {
|
||||
grunt.registerTask('test-run', 'run tests against continuous karma server', function() {
|
||||
var options = ['--single-run', '--no-auto-watch'].concat(this.args);
|
||||
runTestacular('run', options);
|
||||
runKarma('run', options);
|
||||
});
|
||||
|
||||
grunt.registerTask('test-watch', 'start testacular server, watch & execute tests', function() {
|
||||
grunt.registerTask('test-watch', 'start karma server, watch & execute tests', function() {
|
||||
var options = ['--no-single-run', '--auto-watch'].concat(this.args);
|
||||
runTestacular('start', options);
|
||||
runKarma('start', options);
|
||||
});
|
||||
|
||||
//changelog generation
|
||||
|
||||
@@ -52,7 +52,7 @@ We are always looking for the quality contributions! Please check the [CONTRIBUT
|
||||
### Development
|
||||
#### Prepare your environment
|
||||
* Install [Node.js](http://nodejs.org/) and NPM (should come with)
|
||||
* Install global dev dependencies: `npm install -g grunt-cli testacular`
|
||||
* Install global dev dependencies: `npm install -g grunt-cli karma`
|
||||
* Instal local dev dependencies: `npm install` while current directory is bootstrap repo
|
||||
|
||||
#### Build
|
||||
@@ -61,7 +61,7 @@ We are always looking for the quality contributions! Please check the [CONTRIBUT
|
||||
Check the Grunt build file for other tasks that are defined for this project
|
||||
|
||||
#### TDD
|
||||
* Start testacular server: `grunt server`
|
||||
* Start karma server: `grunt server`
|
||||
* Run test: `grunt test-run`
|
||||
|
||||
### Release
|
||||
|
||||
Reference in New Issue
Block a user