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

Add support for a custom Agent #19

Merged
merged 7 commits into from
Mar 1, 2021

Conversation

dhoko
Copy link
Contributor

@dhoko dhoko commented Mar 1, 2021

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Feature, we add support for a custom Agent when we create requests via ws or fetch. cf https://nodejs.org/api/http.html#http_new_agent_options

  • What is the current behavior?

If you have a proxy set ex: inside a CI, Node.JS will break cf nodejs/node#15620 so you need to be able to use a custom agent.

  • What is the new behavior (if this is a feature change)?

It works :)

  • Other information:

@dhoko
Copy link
Contributor Author

dhoko commented Mar 1, 2021

I didn't fix the test from │./tests/analysis.spec.ts because it's random. If I copy/paste the output from corrected the corrected version will change etc. etc. I don't understand.
Ex:

Run 1

 FAIL  tests/analysis.spec.ts                                                                                
  ● Console                                                                                                  
                                                                                                             
    console.log tests/analysis.spec.ts:16                                                                    
      When we have shuffled off this mortal coil,                                                            
        Must give us pause - tthere'sthe respect                                                             
        That makes calamity of so long life.                                                                 
                                                                                                             
  ● further analysis of results › corrects a result                                                          
                                                                                                             
    expect(received).toEqual(expected) // deep equality                                                      
                                                                                                             
    - Expected                                                                                               
    + Received                                                                                               
                                                                                                             
      When we have shuffled off this mortal coil,                                                            
    -   Must give us pause - their's the respect                                                             
    +   Must give us pause - tthere'sthe respect                                                             
        That makes calamity of so long life.                                                                 

Run 2

 FAIL  tests/analysis.spec.ts                                                                                 
 ● Console                                                                                                   
                                                                                                             
   console.log tests/analysis.spec.ts:16                                                                     
     When we have shuffled off this mortal coil,                                                             
       Must ggiveus pause - tthere'sthe respect                                                              
       That makes calamity of so long life.                                                                  
                                                                                                             
 ● further analysis of results › corrects a result                                                           
                                                                                                             
   expect(received).toEqual(expected) // deep equality                                                       
                                                                                                             
   - Expected                                                                                                
   + Received                                                                                                
                                                                                                             
     When we have shuffled off this mortal coil,                                                             
   -   Must give us pause - tthere'sthe respect                                                              
   +   Must ggiveus pause - tthere'sthe respect                                                              
       That makes calamity of so long life.                                                                  

@dhoko dhoko force-pushed the feat/support-agent branch from fc5b018 to 2aa3dcf Compare March 1, 2021 15:42
@stewartmcgown stewartmcgown merged commit aefa965 into stewartmcgown:master Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants