Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

fix: many #5

Merged
merged 2 commits into from
Mar 9, 2021
Merged

fix: many #5

merged 2 commits into from
Mar 9, 2021

Conversation

toutpt
Copy link
Owner

@toutpt toutpt commented Mar 9, 2021

Thanks @trentrand for the review.

All Issues:

  • express CLI do not print help => return accumulator in reducer
  • undefined postData cause the CLI to throw error in case of samebody filter => fix + add test

Bonus: npm upgrade deps

}, { port: 3000 });

if (options.help) {
if (options.help || !options.har) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./express.js -h
har-express/express.js:26
if (options.help) {
^

TypeError: Cannot read property 'help' of undefined

@@ -92,7 +92,7 @@ function filter(HAR, req, options=DEFAULT_OPTIONS) {
let results = entries;
// first lets filter on query params
const withSameQueryString = entries.filter(e => {
return e.request.queryString.every(qs => req.param(qs.name) === qs.value);
return e.request.queryString.every(qs => req.params[qs.name] === qs.value);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix
express deprecated req.param(name): Use req.params, req.body, or req.query instead index.js:95:58

@toutpt toutpt merged commit 737ef87 into main Mar 9, 2021
@toutpt toutpt deleted the jmfrancois/fix/maintenance-follow-review branch March 9, 2021 08:30
@trentrand
Copy link

Thanks for fixing these issues so quickly!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants