GithubHelp home page GithubHelp logo

gerhut / axiosist Goto Github PK

View Code? Open in Web Editor NEW
34.0 34.0 6.0 90 KB

Axios based supertest: convert node.js request handler to axios adapter, used for node.js server unit test.

Home Page: http://npm.im/axiosist

License: MIT License

JavaScript 100.00%

axiosist's Introduction

README.md visitors

MSFT Stock

> 2024-02-22 - 2024-07-16

     467.56 ┤                                                                                           ╭╮       
     463.65 ┤                                                                                           │╰╮╭╮    
     459.74 ┤                                                                                          ╭╯ │││    
     455.83 ┤                                                                                        ╭─╯  ╰╯│    
     451.91 ┤                                                                                     ╭─╮│      ╰──╮ 
     448.00 ┤                                                                               ╭╮ ╭╮╭╯ ││         ╰ 
     444.09 ┤                                                                               │╰─╯╰╯  ╰╯           
     440.18 ┤                                                                            ╭──╯                    
     436.27 ┤                                                                            │                       
     432.36 ┤                                                                           ╭╯                       
     428.44 ┤                   ╭─╮                                       ╭─╮╭──╮       │                        
     424.53 ┤              ╭╮  ╭╯ │   ╭╮  ╭──╮╭╮                         ╭╯ ╰╯  │    ╭╮╭╯                        
     420.62 ┤              ││ ╭╯  ╰───╯╰╮ │  ╰╯╰╮                     ╭─╮│      │   ╭╯╰╯                         
     416.71 ┤              ││╭╯         ╰─╯     │                     │ ╰╯      │   │                            
     412.80 ┤    ╭──╮    ╭─╯╰╯                  ╰─╮            ╭╮  ╭──╯         ╰───╯                            
     408.89 ┼─╮  │  │ ╭╮ │                        ╰╮   ╭╮      │╰──╯                                             
     404.98 ┤ ╰──╯  │ │╰╮│                         │  ╭╯│╭╮   ╭╯                                                 
     401.06 ┤       ╰─╯ ╰╯                         ╰╮╭╯ ││╰╮  │                                                  
     397.15 ┤                                       ╰╯  ╰╯ │ ╭╯                                                  
     393.24 ┤                                              │╭╯                                                   
     389.33 ┤                                              ╰╯                                                    

> Last Refreshed: 2024-07-16

axiosist's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar gerhut avatar greenkeeper[bot] avatar hzaun avatar sallomendo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

axiosist's Issues

An in-range update of @types/node is breaking the build 🚨

The dependency @types/node was updated from 12.7.0 to 12.7.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • coverage/coveralls: First build on greenkeeper/@types/node-12.7.1 at 100.0% (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

The devDependency @types/node was updated from 10.9.4 to 10.10.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

The devDependency @types/node was updated from 10.12.8 to 10.12.9.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • coverage/coveralls: First build on greenkeeper/@types/node-10.12.9 at 100.0% (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

The dependency @types/node was updated from 12.12.21 to 13.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

server listen error event many times

(node:13672) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [Server]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [Server]. Use emitter.setMaxListeners() to increase limit
    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at _addListener (node:events:592:17)
    at Server.addListener (node:events:610:10)
    at /private/node/neptune/server/node_modules/axiosist/index.js:57:10

my fix

if (!server.eventNames().includes('error')) {
  server.on('error', reject)
}

An in-range update of axios is breaking the build 🚨

The dependency axios was updated from 0.19.0 to 0.19.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

axios is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 47 commits.

  • 960e1c8 Releasing 0.19.1
  • 8a9421d Fixing typo in CHANGELOG.md: s/Functionallity/Functionality (#2639)
  • ee47120 If this place is false, it will report an error, so you should delete the useless code. (#2458)
  • 03e6f4b Fixing invalid agent issue (#1904)
  • dc4bc49 fix: fix ignore set withCredentials false (#2582)
  • 13c948e Remove 'includes' API, fix CI build failure (#2574)
  • fa6cf01 fixing Travis link (#2540)
  • a17c70c Fix CI build failure (#2570)
  • 1a32ca0 Remove dependency on is-buffer (#1816)
  • 0cc22c2 Fix badge, use master branch (#2538)
  • 8414664 Fix XSS logic that matched some valid urls (#2529)
  • bbfd5b1 Adding options typings (#2341)
  • 55aaebc Document fix (#2514)
  • 86d7750 Update docs with no_proxy change, issue #2484 (#2513)
  • b0afbed Adding Typescript HTTP method definition for LINK and UNLINK. (#2444)

There are 47 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

The dependency @types/node was updated from 12.12.1 to 12.12.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • coverage/coveralls: First build on greenkeeper/@types/node-12.12.2 at 100.0% (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

Version 10.5.0 of @types/node was just published.

Branch Build failing 🚨
Dependency @types/node
Current Version 10.3.6
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
  • coverage/coveralls First build on greenkeeper/@types/node-10.5.0 at 100.0% Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

axiosist not cleaning up after itself

Step 1:

const axiosist = require('axiosist')
const { app } = require('../../index')
const { Todo } = require('../../models')

describe('GET /todos', () => {
  it('returns a list of todos', async () => {
    const { data: todos } = await axiosist(app).get('/todos')
    todos.forEach(todo => {
      expect(Todo.validate(todo)).toEqual(true)
    })
  })
})

Step 2:

$ jest

Step 3:

Jest did not exit one second after the test run has completed.
This usually means that there are asynchronous operations that weren't stopped in your tests.

Note: It appears supertest has this exact same issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.