Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 8a1fee2

Browse files
committed
chore(grunt): update dependencies
1 parent d3d9d63 commit 8a1fee2

File tree

5 files changed

+99
-45
lines changed

5 files changed

+99
-45
lines changed

.bowerrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

gruntFile.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
module.exports = function(grunt) {
22

3-
grunt.loadNpmTasks('grunt-testacular');
3+
grunt.loadNpmTasks('grunt-karma');
44
grunt.loadNpmTasks('grunt-contrib-jshint');
55

66
// Default task.
7-
grunt.registerTask('default', ['jshint', 'testacular']);
7+
grunt.registerTask('default', ['jshint', 'karma']);
88

9-
var testacularConfig = function(configFile, customOptions) {
10-
var options = {
11-
configFile: configFile,
12-
keepalive: true
13-
};
14-
var travisOptions = process.env.TRAVIS && {
15-
browsers: ['Firefox'],
16-
reporters: 'dots'
17-
};
9+
10+
// HACK TO MAKE TRAVIS WORK
11+
var testConfig = function(configFile, customOptions) {
12+
var options = { configFile: configFile, singleRun: true };
13+
var travisOptions = process.env.TRAVIS && { browsers: ['Firefox', 'PhantomJS'], reporters: ['dots'] };
1814
return grunt.util._.extend(options, customOptions, travisOptions);
1915
};
16+
//
17+
2018

2119
// Project configuration.
2220
grunt.initConfig({
23-
testacular: {
21+
karma: {
2422
unit: {
25-
options: testacularConfig('test/test.conf.js')
23+
options: testConfig('test/karma.conf.js')
2624
}
2725
},
2826
jshint: {

package.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,19 @@
88
"main": "./src/sortable.js",
99
"dependencies": {},
1010
"devDependencies": {
11-
"grunt": "~0.4.1",
12-
"grunt-testacular": "~0.3.0",
13-
"grunt-contrib-jshint": "~0.2.0"
11+
"grunt": "~0.4.x",
12+
"grunt-contrib-jshint": "0.8.x",
13+
"grunt-karma": "0.6.x",
14+
"karma": "0.10.x",
15+
"karma-chrome-launcher": "0.1.x",
16+
"karma-coffee-preprocessor": "0.1.x",
17+
"karma-firefox-launcher": "0.1.x",
18+
"karma-html2js-preprocessor": "0.1.x",
19+
"karma-jasmine": "0.1.x",
20+
"karma-phantomjs-launcher": "0.1.x",
21+
"karma-requirejs": "0.2.x",
22+
"karma-script-launcher": "0.1.x",
23+
"requirejs": "2.1.x"
1424
},
1525
"scripts": {},
1626
"repository": {

test/karma.conf.js

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// Karma configuration
2+
// Generated on Sat Dec 28 2013 20:27:08 GMT+0100 (CET)
3+
4+
module.exports = function(config) {
5+
config.set({
6+
7+
// base path, that will be used to resolve files and exclude
8+
basePath: '..',
9+
10+
11+
// frameworks to use
12+
frameworks: ['jasmine'],
13+
14+
15+
// list of files / patterns to load in the browser
16+
files: [
17+
'bower_components/jquery/jquery.js',
18+
'bower_components/jquery-simulate/jquery.simulate.js',
19+
'test/libs/jquery.simulate.dragandrevert.js',
20+
'bower_components/jquery-ui/ui/jquery-ui.js',
21+
'bower_components/angular/angular.js',
22+
'bower_components/angular-mocks/angular-mocks.js',
23+
'src/sortable.js',
24+
'test/*.spec.js'
25+
],
26+
27+
28+
// list of files to exclude
29+
exclude: [
30+
31+
],
32+
33+
34+
// test results reporter to use
35+
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
36+
reporters: ['progress'],
37+
38+
39+
// web server port
40+
port: 9876,
41+
42+
43+
// enable / disable colors in the output (reporters and logs)
44+
colors: true,
45+
46+
47+
// level of logging
48+
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
49+
logLevel: config.LOG_INFO,
50+
51+
52+
// enable / disable watching file and executing tests whenever any file changes
53+
autoWatch: false,
54+
55+
56+
// Start these browsers, currently available:
57+
// - Chrome
58+
// - ChromeCanary
59+
// - Firefox
60+
// - Opera (has to be installed with `npm install karma-opera-launcher`)
61+
// - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
62+
// - PhantomJS
63+
// - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
64+
browsers: ['Chrome', 'Firefox', 'PhantomJS'],
65+
66+
67+
// If browser does not capture in given timeout [ms], kill it
68+
captureTimeout: 60000,
69+
70+
71+
// Continuous Integration mode
72+
// if true, it capture browsers, run tests and exit
73+
singleRun: false
74+
});
75+
};

test/test.conf.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)