Permalink
Browse files

chore(test): switch to karma

  • Loading branch information...
1 parent b0ffb79 commit aa775b5c96b4b7021ae02bef218022e294aebfd9 @mgcrea committed Apr 11, 2013
Showing with 11 additions and 22 deletions.
  1. +7 −7 Gruntfile.js
  2. +1 −1 package.json
  3. +3 −14 test/{testacular.conf.js → karma.conf.js}
View
@@ -62,7 +62,7 @@ module.exports = function(grunt) {
// files: '<config:jshint.files>',
// tasks: 'default'
// },
- testacular: {
+ karma: {
test: {
options: {
reporters: ['dots'],
@@ -75,7 +75,7 @@ module.exports = function(grunt) {
}
},
options: {
- configFile: 'test/testacular.conf.js',
+ configFile: 'test/karma.conf.js',
browsers: ['PhantomJS']
}
}
@@ -98,17 +98,17 @@ module.exports = function(grunt) {
grunt.registerTask('default', ['test']);
// Test tasks.
- grunt.registerTask('test', ['jshint', 'testacular:test']);
- grunt.registerTask('test-server', ['testacular:server']);
+ grunt.registerTask('test', ['jshint', 'karma:test']);
+ grunt.registerTask('test-server', ['karma:server']);
// Build task.
grunt.registerTask('build', ['test', 'concat', 'uglify']);
- // Provides the "testacular" task.
- grunt.registerMultiTask('testacular', 'Starts up a testacular server.', function() {
+ // Provides the "karma" task.
+ grunt.registerMultiTask('karma', 'Starts up a karma server.', function() {
var done = this.async();
- require('testacular').server.start(this.options(), function(code) {
+ require('karma').server.start(this.options(), function(code) {
done(code === 0);
});
});
View
@@ -13,7 +13,7 @@
},
"dependencies": {},
"devDependencies": {
- "testacular": ">= 0.6.0",
+ "karma": "~ 0.8.0",
"grunt": ">= 0.4.0",
"grunt-contrib-concat": "*",
"grunt-contrib-jshint": "*",
@@ -6,6 +6,9 @@
// base path, that will be used to resolve files and exclude
basePath = './..';
+// frameworks to use
+// frameworks = ['jasmine'];
+
// list of files / patterns to load in the browser
files = [
JASMINE,
@@ -16,7 +19,6 @@ files = [
'test/lib/angular/angular-mocks.js',
'test/lib/bootstrap.js',
'vendor/bootstrap-datepicker.js',
- //'vendor/bootstrap-datepicker.fr.js',
'vendor/bootstrap-timepicker.js',
'src/common.js',
'src/directives/*.js',
@@ -32,7 +34,6 @@ exclude = [];
// 'coverage',
reporters = ['progress'];
-
// web server port
// CLI --port 9876
port = 9876;
@@ -76,15 +77,3 @@ singleRun = false;
// report which specs are slower than 500ms
// CLI --report-slower-than 500
reportSlowerThan = 500;
-
-// compile coffee scripts
-preprocessors = {
- 'src/common.js': 'coverage',
- 'src/directives/*.js': 'coverage'
- //'**/*.coffee': 'coffee'
-};
-
-coverageReporter = {
- type : 'html',
- dir : 'test/coverage/'
-};

0 comments on commit aa775b5

Please sign in to comment.