-
-
Notifications
You must be signed in to change notification settings - Fork 21k
test: enhance req.is() tests with additional cases #6703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Sebastian Beltran <[email protected]>
Signed-off-by: Sebastian Beltran <[email protected]>
@@ -1,7 +1,8 @@ | |||
'use strict' | |||
|
|||
var express = require('..') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var express = require('..') | |
const express = require('..') |
'use strict' | ||
|
||
var express = require('..') | ||
var request = require('supertest') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var request = require('supertest') | |
const request = require('supertest') |
|
||
var express = require('..') | ||
var request = require('supertest') | ||
var after = require('after') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var after = require('after') | |
const after = require('after') |
// in modern JS is better to use const instead of var!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your code was so structured, I mainly review it for learning purposes, well done!
Basically, we support an array as an argument for req.is. This hasn’t been documented, and we should document it on the website.
Ref:
express/lib/request.js
Line 260 in 8f21493