Giter Site home page Giter Site logo

msw-bypass-node-example's Introduction

MSW BYPASS NODE EXAMPLE

This repository demonstrates using MSW to mock requests. I am having issues combining MSW with supertest.

The issue is the bypass function errors out with the following.

FetchError: request to https://api.github.com/gists/bd23a450dfdc2ed1e10092bce0887cf9 failed, reason: bypass(...).then is not a function
 ❯ _NodeClientRequest.<anonymous> node_modules/node-fetch/src/index.js:108:11
 ❯ _NodeClientRequest.emit node:events:514:28
 ❯ _NodeClientRequest.emit node_modules/@mswjs/interceptors/lib/node/chunk-Z26AUTER.mjs:412:18
 ❯ node_modules/@mswjs/interceptors/lib/node/chunk-Z26AUTER.mjs:315:14
 ❯ processTicksAndRejections node:internal/process/task_queues:95:5
Serialized Error: { errno: undefined, code: undefined, erroredSysCall: undefined }
This error originated in "server.test.js" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "expect gist bd23a450dfdc2ed1e10092bce0887cf9 to return bypassed modified request". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- This was the last recorded test before the error was thrown, if error originated after test finished its execution.

msw-bypass-node-example's People

Contributors

arenoir avatar

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.