Skip to content

Commit 6dd5476

Browse files
committed
Version 0.3.6
1 parent 3ddbf6d commit 6dd5476

File tree

7 files changed

+107
-3327
lines changed

7 files changed

+107
-3327
lines changed

.travis.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
language: node_js
22
node_js:
33
- 0.10
4+
before_script:
5+
- export DISPLAY=:99.0
6+
- sh -e /etc/init.d/xvfb start
47
notifications:
5-
email: false
8+
email: false

Gruntfile.js

+9-39
Original file line numberDiff line numberDiff line change
@@ -84,42 +84,12 @@ module.exports = function (grunt) {
8484
}
8585
},
8686

87-
jasmine: {
88-
test: {
89-
version: "1.3.1",
90-
src: [
91-
"lib/backgrid.js",
92-
],
93-
options: {
94-
specs: [
95-
"test/preamble.js",
96-
"test/column.js",
97-
"test/formatter.js",
98-
"test/cell.js",
99-
"test/row.js",
100-
"test/body.js",
101-
"test/header.js",
102-
"test/footer.js",
103-
"test/grid.js"
104-
],
105-
template: require("grunt-template-jasmine-istanbul"),
106-
templateOptions: {
107-
coverage: "test/coverage/coverage.json",
108-
report: {
109-
type: "html",
110-
options: {
111-
dir: "test/coverage"
112-
}
113-
}
114-
},
115-
helpers: "vendor/js/jasmine-html.js",
116-
vendor: [
117-
"test/vendor/js/jquery.js",
118-
"test/vendor/js/underscore.js",
119-
"test/vendor/js/backbone.js",
120-
"test/vendor/js/backbone-pageable.js"
121-
]
122-
}
87+
karma: {
88+
unit: {
89+
configFile: 'karma.conf.js',
90+
background: true,
91+
singleRun: true,
92+
reporter: 'dots'
12393
}
12494
},
12595

@@ -196,11 +166,11 @@ module.exports = function (grunt) {
196166
grunt.loadNpmTasks("grunt-contrib-watch");
197167
grunt.loadNpmTasks("grunt-recess");
198168
grunt.loadNpmTasks("grunt-jsduck");
199-
grunt.loadNpmTasks("grunt-contrib-jasmine");
200169
grunt.loadNpmTasks("grunt-contrib-connect");
170+
grunt.loadNpmTasks("grunt-karma");
201171

202172
grunt.registerTask("doc", ["clean:api", "jsduck"]);
203173
grunt.registerTask("dist", ["concat", "uglify", "recess"]);
204-
grunt.registerTask("test", ["concat", "jasmine"]);
205-
grunt.registerTask("default", ["clean", "doc", "dist", "jasmine"]);
174+
grunt.registerTask("test", ["concat", "karma"]);
175+
grunt.registerTask("default", ["clean", "doc", "dist", "karma"]);
206176
};

karma.conf.js

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
// Karma configuration
2+
// Generated on Wed Mar 09 2016 13:20:18 GMT+0000 (GMT)
3+
4+
module.exports = function(config) {
5+
config.set({
6+
7+
// base path that will be used to resolve all patterns (eg. files, exclude)
8+
basePath: '',
9+
10+
11+
// frameworks to use
12+
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
13+
frameworks: ['jasmine'],
14+
15+
16+
// list of files / patterns to load in the browser
17+
files: [
18+
'test/vendor/js/jquery.js',
19+
'test/vendor/js/underscore.js',
20+
'test/vendor/js/backbone.js',
21+
'test/vendor/js/backbone-pageable.js',
22+
'lib/backgrid.js',
23+
'test/preamble.js',
24+
'test/column.js',
25+
'test/formatter.js',
26+
'test/cell.js',
27+
'test/row.js',
28+
'test/body.js',
29+
'test/header.js',
30+
'test/grid.js'
31+
],
32+
33+
34+
// list of files to exclude
35+
exclude: [
36+
],
37+
38+
39+
// preprocess matching files before serving them to the browser
40+
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
41+
preprocessors: {
42+
43+
},
44+
45+
46+
// test results reporter to use
47+
// possible values: 'dots', 'progress'
48+
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
49+
reporters: ['progress'],
50+
51+
52+
// web server port
53+
port: 9876,
54+
55+
56+
// enable / disable colors in the output (reporters and logs)
57+
colors: true,
58+
59+
60+
// level of logging
61+
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
62+
logLevel: config.LOG_INFO,
63+
64+
65+
// enable / disable watching file and executing tests whenever any file changes
66+
autoWatch: false,
67+
68+
69+
// start these browsers
70+
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
71+
browsers: ['Chrome', 'Firefox', 'Safari'],
72+
73+
74+
// Continuous Integration mode
75+
// if true, Karma captures browsers, runs the tests and exits
76+
singleRun: false,
77+
78+
// Concurrency level
79+
// how many browser should be started simultaneous
80+
concurrency: Infinity,
81+
82+
browserNoActivityTimeout: 30000
83+
})
84+
}

lib/backgrid.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
backgrid 0.3.5
2+
backgrid 0.3.6
33
http://github.com/wyuenho/backgrid
44
55
Copyright (c) 2016 Jimmy Yuen Ho Wong and contributors <wyuenho@gmail.com>

package.json

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "backgrid",
3-
"version": "0.3.5",
3+
"version": "0.3.6",
44
"author": "Jimmy Yuen Ho Wong and contributors <wyuenho@gmail.com>",
55
"description": "Backgrid.js is a set of components for building semantic and easily stylable data grid widgets with Backbone.",
66
"homepage": "http://backgridjs.com/",
@@ -10,7 +10,7 @@
1010
],
1111
"main": "./lib/backgrid.js",
1212
"scripts": {
13-
"test": "grunt test",
13+
"test": "karma start --single-run --browsers Chrome,Firefox",
1414
"prepublish": "grunt dist"
1515
},
1616
"repository": {
@@ -27,17 +27,21 @@
2727
"grunt-contrib-uglify": "~1.0.0",
2828
"grunt-contrib-watch": "~0.6.1",
2929
"grunt-jsduck": "~1.0.1",
30+
"grunt-karma": "^0.12.1",
3031
"grunt-recess": "~1.0.1",
31-
"grunt-template-jasmine-istanbul": "~0.4.0"
32+
"grunt-template-jasmine-istanbul": "~0.4.0",
33+
"karma": "^0.13.22",
34+
"karma-chrome-launcher": "^0.2.2",
35+
"karma-firefox-launcher": "^0.1.7",
36+
"karma-jasmine": "^0.1.6",
37+
"karma-safari-launcher": "^0.1.1"
3238
},
3339
"license": "MIT",
3440
"engines": {
3541
"node": ">=0.10"
3642
},
37-
"private": true,
3843
"dependencies": {
3944
"backbone": "~1.1.2",
40-
"jquery": ">= 1.7.0",
4145
"underscore": "~1.8.3"
4246
}
4347
}

0 commit comments

Comments
 (0)