Skip to content
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

πŸ“… 12/05 @ 12:00pm PT - Refactoring a 10+ years old code base: nock (Part IV) #57

Closed
5 of 16 tasks
gr2m opened this issue Nov 28, 2021 · 4 comments
Closed
5 of 16 tasks
Labels
show Preparation issue for a live show

Comments

@gr2m
Copy link
Owner

gr2m commented Nov 28, 2021

πŸ’πŸ» Refactoring a 10+ years old code base: nock (Part IV)
πŸ“… Sunday, December 5, 2021
πŸ• 12:00am Pacific Time
πŸŽ™οΈ no guests
πŸ“ https://www.twitch.tv/gregorcodes
🏷️ opensource


Subscribe to this issues to get a notification before the show begins and a summary after the show concludes.

πŸ“… 12/05 @ 12:00pm PT - Refactoring a 10+ years old code base: nock (Part IV)

I will continue my refactoring work from last 3 weeks: #55, #54, #53

A humble version of the intercept module is ready and I changed nock's code to use it. Some tests are already passing. This week, I'll try to get as many of the remaining tests to pass as possible, maybe move some tests into the new module where it makes sense.

If we get all existing tests to pass and reach 100% test coverage again, I'll move the internal intercept module to its own repository and publish it as its own npm module.

Outline

  • Quick recap of what we accomplished last week during πŸ“… 11/28 @ 12:00pm PT - Refactoring a 10+ years old code base: nock (Part III)Β #55
  • Make all remaining tests pass, start with these
    • tests/test_client_request.js
    • tests/test_request_overrider.js
    • tests/test_abort.js
    • tests/test_allow_unmocked.js
    • tests/test_allow_unmocked_https.js
    • tests/test_events.js
    • tests/test_net_connect.js
    • tests/test_reply_headers.js
    • tests/test_socket.js
  • Refactor the intercept module, in particular the normalization of request options. I have the gut feeling we should just use the URL api parse a request string and make sure we set all the properties. Have another look at what the native http.RequestClient api is doing.
  • Refactor the nock codebase. Remove no longer used code and obsolete tests.
  • Create the nock/intercept repository and move the internal module there
  • Make sure the new repository is fully documented and has 100% test coverage
  • Setup continuous releases for the new module
  • install the new module as dependency of nock
  • Celebrate the win!

TODOs

Before the show

When show begins

After the show

  • Reset twitter profile after the show
  • recording available tweet

Recording

will be added after the show

Shownotes

will be added after the show

@gr2m gr2m changed the title DO NOT EDIT - Await parsing by GitHub Actions πŸ“… 12/5 @ 12:00pm PT - πŸ“… 12/05 @ 12:00pm PT - Refactoring a 10+ years old code base: nock (Part IV) Nov 28, 2021
@gr2m gr2m added the show Preparation issue for a live show label Nov 28, 2021
@gr2m gr2m changed the title πŸ“… 12/5 @ 12:00pm PT - πŸ“… 12/05 @ 12:00pm PT - Refactoring a 10+ years old code base: nock (Part IV) πŸ“… 12/05 @ 12:00pm PT - Refactoring a 10+ years old code base: nock (Part IV) Dec 3, 2021
@gr2m
Copy link
Owner Author

gr2m commented Dec 5, 2021

Going live in 30 minutes at https://twitch.tv/gregorcodes

@gr2m
Copy link
Owner Author

gr2m commented Dec 5, 2021

I'm now live on https://twitch.tv/gregorcodes

@gr2m
Copy link
Owner Author

gr2m commented Dec 5, 2021

Here is the repository of mitm-esm:
https://github.com/gr2m/mitm-esm

You can install it with npm install mitm-esm

@gr2m
Copy link
Owner Author

gr2m commented Dec 5, 2021

Recording: https://www.twitch.tv/videos/1225179586

@gr2m gr2m closed this as completed Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
show Preparation issue for a live show
Projects
None yet
Development

No branches or pull requests

2 participants
@gr2m and others