1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-25 10:22:18 -05:00

jshint on grunt test works again

This commit is contained in:
Tankred Hase 2013-06-11 17:12:27 +02:00
parent 1c234b7def
commit 6932088aa9
6 changed files with 13 additions and 17 deletions

View File

@ -1,4 +1,5 @@
{
"indent": 4,
"strict": true,
"globalstrict": true,
"node": true,
@ -29,7 +30,8 @@
"deepEqual",
"start",
"chrome",
"define"
"define",
"self"
],
"globals": {

View File

@ -24,9 +24,7 @@ module.exports = function(grunt) {
keepalive: true,
middleware: function(connect, options) {
// Return array of whatever middlewares you want
return [
function(req, res, next) {
return [function(req, res, next) {
res.setHeader('Content-Security-Policy', "default-src 'self'; script-src 'self' 'unsafe-eval'; connect-src *; object-src 'none'; style-src 'self' 'unsafe-inline'");
res.setHeader('X-Content-Security-Policy', "default-src *; script-src 'self' 'unsafe-eval'; options eval-script; object-src 'none'; style-src 'self' 'unsafe-inline'");
res.setHeader('X-WebKit-CSP', "default-src 'self'; script-src 'self' 'unsafe-eval'; connect-src *; object-src 'none'; style-src 'self' 'unsafe-inline'");
@ -42,7 +40,7 @@ module.exports = function(grunt) {
},
jshint: {
all: ['Gruntfile.js', 'src/*.js', 'src/js/**/*.js', 'test/**/*.js'],
all: ['Gruntfile.js', 'src/*.js', 'src/js/**/*.js', 'test/unit/*.js', 'test/integration/*.js'],
options: {
jshintrc: '.jshintrc'
}
@ -52,8 +50,7 @@ module.exports = function(grunt) {
all: {
options: {
timeout: 20000,
urls: [
'http://localhost:<%= connect.test.options.port %>/test/unit/index.html',
urls: ['http://localhost:<%= connect.test.options.port %>/test/unit/index.html',
'http://localhost:<%= connect.test.options.port %>/test/integration/index.html'
]
}
@ -68,7 +65,7 @@ module.exports = function(grunt) {
// Default task(s).
grunt.registerTask('dev', ['connect:dev']);
grunt.registerTask('test', ['connect:test', 'qunit']);
grunt.registerTask('test', ['jshint', 'connect:test', 'qunit']);
grunt.registerTask('prod', ['connect:prod']);
};

View File

@ -1,4 +1,4 @@
(function() {
define(['backbone', 'js/app-config'], function(Backbone, app) {
'use strict';
app.model.PrivateKey = Backbone.Model.extend({
@ -20,4 +20,4 @@
});
}());
});

View File

@ -1,4 +1,4 @@
(function() {
define(['backbone', 'js/app-config'], function(Backbone, app) {
'use strict';
app.model.PublicKey = Backbone.Model.extend({
@ -19,4 +19,4 @@
});
}());
});

View File

@ -20,9 +20,7 @@ require(['../../src/require-config'], function() {
});
function startTests() {
require([
'test/integration/cloudstorage-dao-test'
], function() {
require(['test/integration/cloudstorage-dao-test'], function() {
//Tests loaded, run tests
QUnit.start();
});

View File

@ -19,8 +19,7 @@ require(['../../src/require-config'], function() {
});
function startTests() {
require([
'test/unit/forge-test',
require(['test/unit/forge-test',
'test/unit/aes-test',
'test/unit/rsa-test',
'test/unit/lawnchair-dao-test',