Permalink
Browse files

Fix space-before-function-paren

  • Loading branch information...
1 parent 1360c67 commit 0d87e0e000f5a6f6a90154d7a05355d682d1806b @bananaappletw bananaappletw committed Oct 20, 2016
Showing with 17 additions and 17 deletions.
  1. +1 −1 cookies/test.js
  2. +1 −1 csrf/app.js
  3. +2 −2 csrf/test.js
  4. +2 −2 errors/test.js
  5. +4 −4 multipart/test.js
  6. +1 −1 stream-file/app.js
  7. +3 −3 stream-objects/app.js
  8. +2 −2 stream-server-side-events/db.js
  9. +1 −1 stream-server-side-events/sse.js
View
@@ -2,7 +2,7 @@ var app = require('./app');
var request = require('supertest').agent(app.listen());
describe('Cookies Views', function(){
- [1, 2, 3].forEach(function (i) {
+ [1, 2, 3].forEach(function(i) {
describe('on iteration #' + i, function(){
it('should set the views as a cookie and as the body', function(done){
request
View
@@ -37,7 +37,7 @@ app.use(csrf());
app.use(route.get('/token', token));
app.use(route.post('/post', post));
-function* token () {
+function* token() {
this.body = this.csrf;
}
View
@@ -10,7 +10,7 @@ describe('csrf', function(){
request
.get('/token')
.expect(200)
- .end(function (err, res) {
+ .end(function(err, res) {
token = res.text;
token.should.be.String;
cookie = res.headers['set-cookie'].join(';');
@@ -19,7 +19,7 @@ describe('csrf', function(){
});
});
- describe('POST /post', function () {
+ describe('POST /post', function() {
it('should 403 without token', function(done) {
request
.post('/post')
View
@@ -1,7 +1,7 @@
var app = require('./app');
var request = require('supertest').agent(app.listen());
-describe('Errors', function () {
+describe('Errors', function() {
it('should catch the error', function(done){
request
.get('/')
@@ -10,7 +10,7 @@ describe('Errors', function () {
})
it('should emit the error on app', function(done){
- app.once('error', function (err, ctx) {
+ app.once('error', function(err, ctx) {
err.message.should.equal('boom boom');
ctx.should.be.ok;
done();
View
@@ -26,19 +26,19 @@ var body = [
'-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--'
].join('\r\n')
-describe('Multipart Files', function () {
- it('should store all the files', function (done) {
+describe('Multipart Files', function() {
+ it('should store all the files', function(done) {
request
.post('/')
.set('Content-Type', ct)
.send(body)
.expect(200)
- .end(function (err, res) {
+ .end(function(err, res) {
if (err) return done(err);
var files = res.body;
files.should.have.length(2);
- fs.stat(files[0], function (err) {
+ fs.stat(files[0], function(err) {
if (err) return done(err);
fs.stat(files[1], done);
View
@@ -23,7 +23,7 @@ if (!module.parent) app.listen(3000);
*/
function stat(file) {
- return function (done) {
+ return function(done) {
fs.stat(file, done);
};
}
@@ -10,17 +10,17 @@ app.use(function *(){
stream.on('error', this.onerror);
- setImmediate(function () {
+ setImmediate(function() {
stream.write({
id: 1
});
- setImmediate(function () {
+ setImmediate(function() {
stream.write({
id: 2
});
- setImmediate(function () {
+ setImmediate(function() {
stream.end();
});
});
@@ -6,7 +6,7 @@ var inherits = require('util').inherits;
* Real APIs would care about the `event`.
*/
-exports.subscribe = function (event, options) {
+exports.subscribe = function(event, options) {
return Subscription(options);
};
@@ -26,6 +26,6 @@ function Subscription(options) {
this.value = 0;
}
-Subscription.prototype._read = function () {
+Subscription.prototype._read = function() {
while (this.push(String(this.value++))) {}
};
@@ -17,7 +17,7 @@ function SSE(options) {
Transform.call(this, options);
}
-SSE.prototype._transform = function (data, enc, cb) {
+SSE.prototype._transform = function(data, enc, cb) {
this.push('data: ' + data.toString('utf8') + '\n\n');
cb();
};

0 comments on commit 0d87e0e

Please sign in to comment.