mirror of
https://github.com/moparisthebest/mail
synced 2024-11-22 08:52:15 -05:00
comment out integration tests
This commit is contained in:
parent
36802d8dba
commit
4663969038
123
Gruntfile.js
123
Gruntfile.js
@ -1,71 +1,72 @@
|
|||||||
module.exports = function(grunt) {
|
module.exports = function(grunt) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// Project configuration.
|
// Project configuration.
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
connect: {
|
connect: {
|
||||||
dev: {
|
dev: {
|
||||||
options: {
|
options: {
|
||||||
port: 8580,
|
port: 8580,
|
||||||
base: '.',
|
base: '.',
|
||||||
keepalive: true
|
keepalive: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
test: {
|
test: {
|
||||||
options: {
|
options: {
|
||||||
port: 8581,
|
port: 8581,
|
||||||
base: '.'
|
base: '.'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
prod: {
|
prod: {
|
||||||
options: {
|
options: {
|
||||||
port: process.env.PORT || 8585,
|
port: process.env.PORT || 8585,
|
||||||
base: './src/',
|
base: './src/',
|
||||||
keepalive: true,
|
keepalive: true,
|
||||||
middleware: function(connect, options) {
|
middleware: function(connect, options) {
|
||||||
// Return array of whatever middlewares you want
|
// 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('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-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'");
|
res.setHeader('X-WebKit-CSP', "default-src 'self'; script-src 'self' 'unsafe-eval'; connect-src *; object-src 'none'; style-src 'self' 'unsafe-inline'");
|
||||||
|
|
||||||
return next();
|
return next();
|
||||||
},
|
},
|
||||||
|
|
||||||
// Serve static files.
|
// Serve static files.
|
||||||
connect.static(options.base)];
|
connect.static(options.base)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
jshint: {
|
jshint: {
|
||||||
all: ['Gruntfile.js', 'src/*.js', 'src/js/**/*.js', 'test/unit/*.js', 'test/integration/*.js'],
|
all: ['Gruntfile.js', 'src/*.js', 'src/js/**/*.js', 'test/unit/*.js', 'test/integration/*.js'],
|
||||||
options: {
|
options: {
|
||||||
jshintrc: '.jshintrc'
|
jshintrc: '.jshintrc'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
qunit: {
|
qunit: {
|
||||||
all: {
|
all: {
|
||||||
options: {
|
options: {
|
||||||
timeout: 20000,
|
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'
|
/*,
|
||||||
]
|
'http://localhost:<%= connect.test.options.port %>/test/integration/index.html'*/
|
||||||
}
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Load the plugin(s)
|
// Load the plugin(s)
|
||||||
grunt.loadNpmTasks('grunt-contrib-connect');
|
grunt.loadNpmTasks('grunt-contrib-connect');
|
||||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||||
grunt.loadNpmTasks('grunt-contrib-qunit');
|
grunt.loadNpmTasks('grunt-contrib-qunit');
|
||||||
|
|
||||||
// Default task(s).
|
// Default task(s).
|
||||||
grunt.registerTask('dev', ['connect:dev']);
|
grunt.registerTask('dev', ['connect:dev']);
|
||||||
grunt.registerTask('test', ['jshint', 'connect:test', 'qunit']);
|
grunt.registerTask('test', ['jshint', 'connect:test', 'qunit']);
|
||||||
grunt.registerTask('prod', ['connect:prod']);
|
grunt.registerTask('prod', ['connect:prod']);
|
||||||
|
|
||||||
};
|
};
|
@ -199,9 +199,8 @@ var _initSocket = function(client, socket, tlsOptions) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var out = request.toString();
|
var out = request.toString();
|
||||||
if(request.body)
|
if(request.body) {
|
||||||
{
|
out += request.body;
|
||||||
out += request.body;
|
|
||||||
}
|
}
|
||||||
request.time = +new Date();
|
request.time = +new Date();
|
||||||
socket.send(out);
|
socket.send(out);
|
||||||
@ -1200,6 +1199,9 @@ http.createResponse = function() {
|
|||||||
response.readBody = function(b) {
|
response.readBody = function(b) {
|
||||||
var contentLength = response.getField('Content-Length');
|
var contentLength = response.getField('Content-Length');
|
||||||
var transferEncoding = response.getField('Transfer-Encoding');
|
var transferEncoding = response.getField('Transfer-Encoding');
|
||||||
|
if(contentLength !== null) {
|
||||||
|
contentLength = parseInt(contentLength);
|
||||||
|
}
|
||||||
|
|
||||||
// read specified length
|
// read specified length
|
||||||
if(contentLength !== null && contentLength >= 0) {
|
if(contentLength !== null && contentLength >= 0) {
|
||||||
|
@ -515,6 +515,8 @@ p7.createEnvelopedData = function() {
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user