use strict in all .js files

closes #508
This commit is contained in:
Tejas Manohar 2015-10-11 17:59:51 -05:00 committed by Jonathan Ong
parent f875eb0c30
commit 0b1b49cb8a
65 changed files with 138 additions and 8 deletions

View file

@ -1,4 +1,6 @@
'use strict';
var http = require('http');
var koa = require('../..');
var app = koa();

View file

@ -1,4 +1,6 @@
'use strict';
// support async await by babel
require('babel/register')({
optional: ['asyncToGenerator']

View file

@ -1,4 +1,6 @@
'use strict';
var http = require('http');
var koa = require('..');
var app = koa();

View file

@ -1,4 +1,6 @@
'use strict';
/**
* Module dependencies.
*/

View file

@ -1,4 +1,6 @@
'use strict';
/**
* Module dependencies.
*/

View file

@ -1,4 +1,6 @@
'use strict';
/**
* Module dependencies.
*/

View file

@ -1,4 +1,6 @@
'use strict';
/**
* Module dependencies.
*/

View file

@ -1,4 +1,6 @@
'use strict';
var stderr = require('test-console').stderr;
var request = require('supertest');
var statuses = require('statuses');

View file

@ -1,4 +1,6 @@
'use strict';
var Stream = require('stream');
var koa = require('..');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('supertest');
var koa = require('../..');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.inspect()', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('supertest');
var koa = require('../..');

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('supertest');
var assert = require('assert');
var koa = require('../..');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.toJSON()', function(){

View file

@ -1,4 +1,6 @@
'use strict';
/**
* Separate file primarily because we use `require('babel/register')`.
*/

View file

@ -1,4 +1,6 @@
'use strict';
require('babel/register')({
optional: ['asyncToGenerator']
});

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.accepts(types)', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.acceptsCharsets()', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.acceptsEncodings()', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.acceptsLanguages(langs)', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request;
var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.fresh', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.get(name)', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request;
describe('req.header', function(){
@ -6,4 +8,4 @@ describe('req.header', function(){
var req = request();
req.header.should.equal(req.req.headers);
})
})
})

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request;
describe('req.headers', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request;
var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request;
var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var Stream = require('stream');
var http = require('http');
var koa = require('../../');

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request;
describe('ctx.idempotent', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request;
var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request;
describe('req.ip', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request;
describe('req.ips', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
var should = require('should');
var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request;
var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var Stream = require('stream');
var http = require('http');
var koa = require('../../');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.path', function(){
@ -26,4 +28,4 @@ describe('ctx.path=', function(){
ctx.originalUrl.should.equal('/login');
ctx.request.originalUrl.should.equal('/login');
})
})
})

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request;
describe('req.protocol', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.query', function(){
@ -38,4 +40,4 @@ describe('ctx.query=', function(){
ctx.originalUrl.should.equal('/store/shoes');
ctx.request.originalUrl.should.equal('/store/shoes');
})
})
})

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.querystring', function(){
@ -42,4 +44,4 @@ describe('ctx.querystring=', function(){
ctx.originalUrl.should.equal('/store/shoes');
ctx.request.originalUrl.should.equal('/store/shoes');
})
})
})

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.search=', function(){
@ -34,4 +36,4 @@ describe('ctx.search=', function(){
ctx.search.should.equal('');
})
})
})
})

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request;
describe('req.secure', function(){
@ -7,4 +9,4 @@ describe('req.secure', function(){
req.req.socket = { encrypted: true };
req.secure.should.be.true;
})
})
})

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('req.stale', function(){
@ -11,4 +13,4 @@ describe('req.stale', function(){
ctx.fresh.should.be.true;
ctx.stale.should.be.false;
})
})
})

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request;
describe('req.subdomains', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request;
var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.append(name, val)', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
var request = require('supertest');
var koa = require('../..');

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response;
var assert = require('assert');
var fs = require('fs');

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response;
describe('res.etag=', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response;
describe('res.header', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response;
describe('res.header', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response;
var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
var should = require('should');
var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response;
describe('res.lastModified', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response;
var should = require('should');
var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response;
var Stream = require('stream');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.redirect(url)', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.remove(name)', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.set(name, val)', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response;
var Stream = require('stream');

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response;
var request = require('supertest');
var statuses = require('statuses');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context');
describe('ctx.vary(field)', function(){
@ -29,4 +31,4 @@ describe('ctx.vary(field)', function(){
ctx.response.header.vary.should.equal('Accept, Accept-Encoding');
})
})
})
})

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response;
describe('res.writable', function(){