Skip to content

Commit e088b56

Browse files
actually add a js test
Signed-off-by: Christoph Wurst <[email protected]>
1 parent ca0f857 commit e088b56

File tree

3 files changed

+53
-17
lines changed

3 files changed

+53
-17
lines changed

Diff for: Gruntfile.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -25,33 +25,33 @@ module.exports = function (grunt) {
2525
options: {
2626
sourceMap: true
2727
},
28-
my_targets: {
29-
files: {
30-
'public/js/weinstein.js': [
31-
'app/client/js/[!tests]**/*.js'
32-
]
33-
}
34-
}
35-
},
36-
less: {
37-
production: {
38-
files: {
39-
'public/css/weinstein.css': 'app/client/less/weinstein.less',
40-
'public/css/bootstrap.css': 'app/client/less/bootstrap.less',
41-
'public/css/bootstrap-theme.css': 'app/client/less/theme.less'
42-
}
28+
build: {
29+
src: [
30+
'app/client/js/**/*.js',
31+
'!app/client/js/tests/**/*.js'
32+
],
33+
dest: 'public/js/weinstein.js'
4334
}
4435
},
4536
watch: {
4637
uglify: {
4738
files: [
48-
'app/client/js/[!tests]**/*.js'
39+
'<%= uglify.build.src %>'
4940
],
5041
tasks: [
5142
'uglify'
5243
]
5344
}
5445
},
46+
less: {
47+
production: {
48+
files: {
49+
'public/css/weinstein.css': 'app/client/less/weinstein.less',
50+
'public/css/bootstrap.css': 'app/client/less/bootstrap.less',
51+
'public/css/bootstrap-theme.css': 'app/client/less/theme.less'
52+
}
53+
}
54+
},
5555
karma: {
5656
unit: {
5757
configFile: 'karma.conf.js',

Diff for: app/client/js/tests/models/taster_spec.js

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* @author Christoph Wurst <[email protected]>
3+
*
4+
* @license AGPL-3.0
5+
*
6+
* This code is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Affero General Public License, version 3,
8+
* as published by the Free Software Foundation.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU Affero General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Affero General Public License,version 3,
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>
17+
*
18+
*/
19+
20+
describe('Taster', function() {
21+
var taster;
22+
23+
beforeEach(function() {
24+
taster = new Weinstein.Models.Taster();
25+
});
26+
27+
it('has default values',function() {
28+
expect(taster.get('active')).toBe(true);
29+
expect(taster.get('name')).toBe('');
30+
});
31+
});

Diff for: karma.conf.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ module.exports = function(config) {
1010
// list of files / patterns to load in the browser
1111
files: [
1212
'public/js/vendor/jquery/dist/jquery.js',
13-
{pattern: 'app/client/js/**/*.js', included: false},
13+
'public/js/vendor/underscore/underscore.js',
14+
'public/js/vendor/backbone/backbone.js',
15+
'public/js/vendor/backbone.radio/build/backbone.radio.js',
16+
'public/js/vendor/backbone.marionette/lib/backbone.marionette.js',
17+
'public/js/vendor/handlebars/handlebars.js',
18+
{pattern: 'app/client/js/**/*.js', included: true},
1419
{pattern: 'app/client/js/tests/**/*.js', included: true}
1520
],
1621

0 commit comments

Comments
 (0)