From a65913776d0b16837364ee66caa1a7f38a9997c0 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Wed, 9 Feb 2022 01:07:08 -0500 Subject: [PATCH] tests: use strict mode --- test/Route.js | 1 + test/Router.js | 1 + test/app.all.js | 1 + test/app.del.js | 1 + test/app.engine.js | 1 + test/app.head.js | 1 + test/app.js | 1 + test/app.listen.js | 1 + test/app.locals.js | 1 + test/app.options.js | 1 + test/app.param.js | 1 + test/app.render.js | 1 + test/app.request.js | 1 + test/app.response.js | 1 + test/app.route.js | 2 ++ test/app.router.js | 1 + test/app.routes.error.js | 1 + test/app.use.js | 1 + test/config.js | 1 + test/exports.js | 1 + test/express.json.js | 1 + test/express.raw.js | 1 + test/express.static.js | 1 + test/express.text.js | 1 + test/express.urlencoded.js | 1 + test/middleware.basic.js | 1 + test/regression.js | 1 + test/req.accepts.js | 1 + test/req.acceptsCharset.js | 1 + test/req.acceptsCharsets.js | 1 + test/req.acceptsEncoding.js | 1 + test/req.acceptsEncodings.js | 1 + test/req.acceptsLanguage.js | 1 + test/req.acceptsLanguages.js | 1 + test/req.baseUrl.js | 1 + test/req.fresh.js | 1 + test/req.get.js | 1 + test/req.host.js | 1 + test/req.hostname.js | 1 + test/req.ip.js | 1 + test/req.ips.js | 1 + test/req.is.js | 1 + test/req.param.js | 1 + test/req.path.js | 1 + test/req.protocol.js | 1 + test/req.query.js | 1 + test/req.range.js | 1 + test/req.route.js | 1 + test/req.secure.js | 1 + test/req.signedCookies.js | 1 + test/req.stale.js | 1 + test/req.subdomains.js | 1 + test/req.xhr.js | 1 + test/res.append.js | 1 + test/res.attachment.js | 1 + test/res.clearCookie.js | 1 + test/res.cookie.js | 1 + test/res.download.js | 1 + test/res.format.js | 1 + test/res.get.js | 1 + test/res.json.js | 1 + test/res.jsonp.js | 1 + test/res.links.js | 1 + test/res.locals.js | 1 + test/res.location.js | 1 + test/res.redirect.js | 1 + test/res.render.js | 1 + test/res.send.js | 1 + test/res.sendFile.js | 1 + test/res.sendStatus.js | 1 + test/res.set.js | 1 + test/res.status.js | 1 + test/res.type.js | 1 + test/res.vary.js | 1 + test/utils.js | 1 + 75 files changed, 76 insertions(+) diff --git a/test/Route.js b/test/Route.js index 8f90152d8c..005b4634e9 100644 --- a/test/Route.js +++ b/test/Route.js @@ -1,3 +1,4 @@ +'use strict' var after = require('after'); var should = require('should'); diff --git a/test/Router.js b/test/Router.js index 16522f6aa8..907b972636 100644 --- a/test/Router.js +++ b/test/Router.js @@ -1,3 +1,4 @@ +'use strict' var after = require('after'); var express = require('../') diff --git a/test/app.all.js b/test/app.all.js index 45c3ddb93b..185a8332fe 100644 --- a/test/app.all.js +++ b/test/app.all.js @@ -1,3 +1,4 @@ +'use strict' var after = require('after') var express = require('../') diff --git a/test/app.del.js b/test/app.del.js index d419fbb158..e9e5769d65 100644 --- a/test/app.del.js +++ b/test/app.del.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/app.engine.js b/test/app.engine.js index 0d54c90d56..214510a94c 100644 --- a/test/app.engine.js +++ b/test/app.engine.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert') var express = require('../') diff --git a/test/app.head.js b/test/app.head.js index 6aa1bb8003..fabb98795a 100644 --- a/test/app.head.js +++ b/test/app.head.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../'); var request = require('supertest'); diff --git a/test/app.js b/test/app.js index 70f72de7c7..6134717c33 100644 --- a/test/app.js +++ b/test/app.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert') var express = require('..') diff --git a/test/app.listen.js b/test/app.listen.js index 9d54ca5244..08eeaaa63c 100644 --- a/test/app.listen.js +++ b/test/app.listen.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') diff --git a/test/app.locals.js b/test/app.locals.js index 0b14ac9070..88f83c9483 100644 --- a/test/app.locals.js +++ b/test/app.locals.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert') var express = require('../') diff --git a/test/app.options.js b/test/app.options.js index 9c88abafe5..fdfd38c8a2 100644 --- a/test/app.options.js +++ b/test/app.options.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/app.param.js b/test/app.param.js index 7dbe3ffb61..8893851f9d 100644 --- a/test/app.param.js +++ b/test/app.param.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert') var express = require('../') diff --git a/test/app.render.js b/test/app.render.js index d0b367189b..9d202acfdd 100644 --- a/test/app.render.js +++ b/test/app.render.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert') var express = require('..'); diff --git a/test/app.request.js b/test/app.request.js index 0288f80b09..4930af84c2 100644 --- a/test/app.request.js +++ b/test/app.request.js @@ -1,3 +1,4 @@ +'use strict' var after = require('after') var express = require('../') diff --git a/test/app.response.js b/test/app.response.js index ea696b566f..5fb69f6275 100644 --- a/test/app.response.js +++ b/test/app.response.js @@ -1,3 +1,4 @@ +'use strict' var after = require('after') var express = require('../') diff --git a/test/app.route.js b/test/app.route.js index 75e5e0b842..eaf8a12051 100644 --- a/test/app.route.js +++ b/test/app.route.js @@ -1,3 +1,5 @@ +'use strict' + var express = require('../'); var request = require('supertest'); diff --git a/test/app.router.js b/test/app.router.js index 8c98aa869b..3069a22c77 100644 --- a/test/app.router.js +++ b/test/app.router.js @@ -1,3 +1,4 @@ +'use strict' var after = require('after'); var express = require('../') diff --git a/test/app.routes.error.js b/test/app.routes.error.js index b1f95d0d6e..56081b3112 100644 --- a/test/app.routes.error.js +++ b/test/app.routes.error.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert') var express = require('../') diff --git a/test/app.use.js b/test/app.use.js index 55ba0689c8..fd9b1751a3 100644 --- a/test/app.use.js +++ b/test/app.use.js @@ -1,3 +1,4 @@ +'use strict' var after = require('after'); var assert = require('assert') diff --git a/test/config.js b/test/config.js index 17a02b7eba..8386a4471c 100644 --- a/test/config.js +++ b/test/config.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert'); var express = require('..'); diff --git a/test/exports.js b/test/exports.js index 7624a8c864..98d7936594 100644 --- a/test/exports.js +++ b/test/exports.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert') var express = require('../'); diff --git a/test/express.json.js b/test/express.json.js index 907fa0cfeb..53a39565a9 100644 --- a/test/express.json.js +++ b/test/express.json.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert') var Buffer = require('safe-buffer').Buffer diff --git a/test/express.raw.js b/test/express.raw.js index 571c29ca9b..cbd0736e7c 100644 --- a/test/express.raw.js +++ b/test/express.raw.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert') var Buffer = require('safe-buffer').Buffer diff --git a/test/express.static.js b/test/express.static.js index 56d3657bff..245fd5929c 100644 --- a/test/express.static.js +++ b/test/express.static.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert') var Buffer = require('safe-buffer').Buffer diff --git a/test/express.text.js b/test/express.text.js index 7c92f90e5a..ebc12cd109 100644 --- a/test/express.text.js +++ b/test/express.text.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert') var Buffer = require('safe-buffer').Buffer diff --git a/test/express.urlencoded.js b/test/express.urlencoded.js index 6011de05f7..340eb74316 100644 --- a/test/express.urlencoded.js +++ b/test/express.urlencoded.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert') var Buffer = require('safe-buffer').Buffer diff --git a/test/middleware.basic.js b/test/middleware.basic.js index 4616842ed6..19f00d9a29 100644 --- a/test/middleware.basic.js +++ b/test/middleware.basic.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert') var express = require('../'); diff --git a/test/regression.js b/test/regression.js index 5d4509ed6f..4e99b30694 100644 --- a/test/regression.js +++ b/test/regression.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.accepts.js b/test/req.accepts.js index 0df4780e22..2066fb5185 100644 --- a/test/req.accepts.js +++ b/test/req.accepts.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.acceptsCharset.js b/test/req.acceptsCharset.js index f7d0cc0e30..6dbab439b7 100644 --- a/test/req.acceptsCharset.js +++ b/test/req.acceptsCharset.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.acceptsCharsets.js b/test/req.acceptsCharsets.js index d1c459174a..360a9878a7 100644 --- a/test/req.acceptsCharsets.js +++ b/test/req.acceptsCharsets.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.acceptsEncoding.js b/test/req.acceptsEncoding.js index f2af68da22..bcec2280e6 100644 --- a/test/req.acceptsEncoding.js +++ b/test/req.acceptsEncoding.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.acceptsEncodings.js b/test/req.acceptsEncodings.js index dc21c4edda..c36934290a 100644 --- a/test/req.acceptsEncodings.js +++ b/test/req.acceptsEncodings.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.acceptsLanguage.js b/test/req.acceptsLanguage.js index 616e723946..816be244eb 100644 --- a/test/req.acceptsLanguage.js +++ b/test/req.acceptsLanguage.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.acceptsLanguages.js b/test/req.acceptsLanguages.js index 87bf7b25df..e5629fbc32 100644 --- a/test/req.acceptsLanguages.js +++ b/test/req.acceptsLanguages.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.baseUrl.js b/test/req.baseUrl.js index 9ac9d88029..b70803ea8b 100644 --- a/test/req.baseUrl.js +++ b/test/req.baseUrl.js @@ -1,3 +1,4 @@ +'use strict' var express = require('..') var request = require('supertest') diff --git a/test/req.fresh.js b/test/req.fresh.js index 1aa8fa5b21..9160e2caaf 100644 --- a/test/req.fresh.js +++ b/test/req.fresh.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.get.js b/test/req.get.js index 109a2d90ce..16589b3f05 100644 --- a/test/req.get.js +++ b/test/req.get.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest') diff --git a/test/req.host.js b/test/req.host.js index 7bb0b27acf..2c051fb979 100644 --- a/test/req.host.js +++ b/test/req.host.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest') diff --git a/test/req.hostname.js b/test/req.hostname.js index 09bfb89989..b3716b566a 100644 --- a/test/req.hostname.js +++ b/test/req.hostname.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest') diff --git a/test/req.ip.js b/test/req.ip.js index 23623cfce6..6bb3c5ac52 100644 --- a/test/req.ip.js +++ b/test/req.ip.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.ips.js b/test/req.ips.js index a7d464b846..2f9a0736ea 100644 --- a/test/req.ips.js +++ b/test/req.ips.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.is.js b/test/req.is.js index a2fce17867..c5904dd600 100644 --- a/test/req.is.js +++ b/test/req.is.js @@ -1,3 +1,4 @@ +'use strict' var express = require('..') var request = require('supertest') diff --git a/test/req.param.js b/test/req.param.js index 89f0295cd9..b3748c02bc 100644 --- a/test/req.param.js +++ b/test/req.param.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest') diff --git a/test/req.path.js b/test/req.path.js index 6ad4009c7d..3ff6177c74 100644 --- a/test/req.path.js +++ b/test/req.path.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.protocol.js b/test/req.protocol.js index 453ad11ca4..61f76356b4 100644 --- a/test/req.protocol.js +++ b/test/req.protocol.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.query.js b/test/req.query.js index f3e8df8a18..6fae592dcc 100644 --- a/test/req.query.js +++ b/test/req.query.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert') var express = require('../') diff --git a/test/req.range.js b/test/req.range.js index 5443c0658d..111441736e 100644 --- a/test/req.range.js +++ b/test/req.range.js @@ -1,3 +1,4 @@ +'use strict' var express = require('..'); var request = require('supertest') diff --git a/test/req.route.js b/test/req.route.js index b32d470bd6..6c17fbb1c8 100644 --- a/test/req.route.js +++ b/test/req.route.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.secure.js b/test/req.secure.js index 2025c8786b..0097ed6136 100644 --- a/test/req.secure.js +++ b/test/req.secure.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.signedCookies.js b/test/req.signedCookies.js index a55f81b22c..db56195166 100644 --- a/test/req.signedCookies.js +++ b/test/req.signedCookies.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest') diff --git a/test/req.stale.js b/test/req.stale.js index 30c9d05d51..cda77fa403 100644 --- a/test/req.stale.js +++ b/test/req.stale.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.subdomains.js b/test/req.subdomains.js index 18e4d80ad3..e5600f2eb5 100644 --- a/test/req.subdomains.js +++ b/test/req.subdomains.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/req.xhr.js b/test/req.xhr.js index 3ad1c6fb72..99cf7f1917 100644 --- a/test/req.xhr.js +++ b/test/req.xhr.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/res.append.js b/test/res.append.js index f7f1d55b3c..5b12e35b69 100644 --- a/test/res.append.js +++ b/test/res.append.js @@ -1,3 +1,4 @@ +'use strict' var express = require('..') var request = require('supertest') diff --git a/test/res.attachment.js b/test/res.attachment.js index 4c3d4aa2f1..6283ded0d6 100644 --- a/test/res.attachment.js +++ b/test/res.attachment.js @@ -1,3 +1,4 @@ +'use strict' var Buffer = require('safe-buffer').Buffer var express = require('../') diff --git a/test/res.clearCookie.js b/test/res.clearCookie.js index 4822057e92..fc0cfb99a3 100644 --- a/test/res.clearCookie.js +++ b/test/res.clearCookie.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/res.cookie.js b/test/res.cookie.js index 8f8662c217..d10e48646b 100644 --- a/test/res.cookie.js +++ b/test/res.cookie.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest') diff --git a/test/res.download.js b/test/res.download.js index 579f8c67a9..ce0ee088ba 100644 --- a/test/res.download.js +++ b/test/res.download.js @@ -1,3 +1,4 @@ +'use strict' var after = require('after'); var assert = require('assert'); diff --git a/test/res.format.js b/test/res.format.js index 076b78d738..24e18d9552 100644 --- a/test/res.format.js +++ b/test/res.format.js @@ -1,3 +1,4 @@ +'use strict' var after = require('after') var express = require('../') diff --git a/test/res.get.js b/test/res.get.js index a53bdc3380..a5f12e2e53 100644 --- a/test/res.get.js +++ b/test/res.get.js @@ -1,3 +1,4 @@ +'use strict' var express = require('..'); var request = require('supertest'); diff --git a/test/res.json.js b/test/res.json.js index 59227a830b..dcaceae5ca 100644 --- a/test/res.json.js +++ b/test/res.json.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest') diff --git a/test/res.jsonp.js b/test/res.jsonp.js index 3444d5138b..0735d43bd5 100644 --- a/test/res.jsonp.js +++ b/test/res.jsonp.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest') diff --git a/test/res.links.js b/test/res.links.js index 36630c9ccc..240b7fcfda 100644 --- a/test/res.links.js +++ b/test/res.links.js @@ -1,3 +1,4 @@ +'use strict' var express = require('..'); var request = require('supertest'); diff --git a/test/res.locals.js b/test/res.locals.js index a1c819667a..c4365b36f3 100644 --- a/test/res.locals.js +++ b/test/res.locals.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/res.location.js b/test/res.location.js index c0bfbe8c8e..158afac01e 100644 --- a/test/res.location.js +++ b/test/res.location.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/res.redirect.js b/test/res.redirect.js index c07df5dd2c..be7c773bee 100644 --- a/test/res.redirect.js +++ b/test/res.redirect.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert') var express = require('..'); diff --git a/test/res.render.js b/test/res.render.js index 643a57002a..50f0b0a742 100644 --- a/test/res.render.js +++ b/test/res.render.js @@ -1,3 +1,4 @@ +'use strict' var express = require('..'); var path = require('path') diff --git a/test/res.send.js b/test/res.send.js index e62caf95dc..8f849f8069 100644 --- a/test/res.send.js +++ b/test/res.send.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert') var Buffer = require('safe-buffer').Buffer diff --git a/test/res.sendFile.js b/test/res.sendFile.js index 183faceb1d..c7fc93a76d 100644 --- a/test/res.sendFile.js +++ b/test/res.sendFile.js @@ -1,3 +1,4 @@ +'use strict' var after = require('after'); var Buffer = require('safe-buffer').Buffer diff --git a/test/res.sendStatus.js b/test/res.sendStatus.js index c355bc408f..9b1de8385c 100644 --- a/test/res.sendStatus.js +++ b/test/res.sendStatus.js @@ -1,3 +1,4 @@ +'use strict' var express = require('..') var request = require('supertest') diff --git a/test/res.set.js b/test/res.set.js index e46d123947..04511c1c95 100644 --- a/test/res.set.js +++ b/test/res.set.js @@ -1,3 +1,4 @@ +'use strict' var express = require('..'); var request = require('supertest'); diff --git a/test/res.status.js b/test/res.status.js index 8c173a645c..e0abc73c4c 100644 --- a/test/res.status.js +++ b/test/res.status.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/res.type.js b/test/res.type.js index cc1dd08d41..980717a6e3 100644 --- a/test/res.type.js +++ b/test/res.type.js @@ -1,3 +1,4 @@ +'use strict' var express = require('../') , request = require('supertest'); diff --git a/test/res.vary.js b/test/res.vary.js index 9d39a341c0..1efc20b445 100644 --- a/test/res.vary.js +++ b/test/res.vary.js @@ -1,3 +1,4 @@ +'use strict' var express = require('..'); var request = require('supertest'); diff --git a/test/utils.js b/test/utils.js index a0fac7a722..f0cb3c3761 100644 --- a/test/utils.js +++ b/test/utils.js @@ -1,3 +1,4 @@ +'use strict' var assert = require('assert'); var Buffer = require('safe-buffer').Buffer