next-test-api-route-handler

⚡ Confidently unit and integration test your Next.js API routes/handlers in an isolated Next.js-like environment

MIT License

Downloads
150.8K
Stars
255
Committers
10

Bot releases are hidden (Show)

next-test-api-route-handler - v4.0.0-canary.1

Published by Xunnamius over 2 years ago

4.0.0-canary.1 (2022-02-18)

💥 BREAKING CHANGES 💥

  • package: main, types, module keys removed from package.json.
    typesVersions will be removed in the next major release.
  • package: Node12 is officially end-of-life and hence no longer supported by NTARH

⚙️ Build system

  • Simplify package distributables using commonjs-static (webpack) and esm-shakable (babel) (bd552b8)

🧙🏿 Refactored

  • package: update minimum node engine to 14.19.0 (a1b4c93)
  • package: use "exports" key exclusively (e999cad)
next-test-api-route-handler - v3.1.1

Published by Xunnamius over 2 years ago

3.1.1 (2022-02-18)

🪄 Fixes

next-test-api-route-handler - v3.1.0

Published by Xunnamius over 2 years ago

3.1.0 (2022-02-11)

✨ Features

⚙️ Build system

  • deps: bump next from 12.0.8 to 12.0.10 (fe73843)
  • deps: bump next from 12.0.8 to 12.0.10 (2a2f0b2)
  • readme: explain MSW compat default behavior (0ee4ce5)
next-test-api-route-handler - v3.0.3

Published by Xunnamius over 2 years ago

3.0.3 (2022-02-05)

⚙️ Build system

  • package: bump node-fetch to 2.6.7 (1e8cd85)
next-test-api-route-handler - v3.0.2

Published by Xunnamius almost 3 years ago

3.0.2 (2022-01-03)

⚙️ Build system

  • readme: update shields.io maintenance badge to 2022 (84f74f5)
next-test-api-route-handler - v3.0.1

Published by Xunnamius almost 3 years ago

3.0.1 (2021-12-27)

⚙️ Build system

  • package: retire use of sort-package-json fork (a925da2)
next-test-api-route-handler - v3.0.0

Published by Xunnamius almost 3 years ago

3.0.0 (2021-12-17)

💥 BREAKING CHANGES 💥

  • src: fetch now comes from node-fetch directly instead of isomorphic-unfetch
  • src: exported TestParameters type has been renamed to NtarhParameters

✨ Features

  • package: remove debug dependency (moved into dev-deps) (d3c60cb)
  • src: improved error handling; add support for new rejectOnHandlerError option (68d30da)
  • src: move test-listen functionality into NTARH; remove dependency (15c899a)
  • src: replace isomorphic-unfetch with node-fetch (5a1a2ee)

🧙🏿 Refactored

next-test-api-route-handler - v2.3.4

Published by Xunnamius almost 3 years ago

2.3.4 (2021-11-16)

🪄 Fixes

  • src: lazy-load contents of the "cookies" field (854704b)

⚙️ Build system

  • Re-enable treeshaking in webpack (9302bcc)
next-test-api-route-handler - v2.3.3

Published by Xunnamius almost 3 years ago

2.3.3 (2021-11-10)

⚙️ Build system

  • Differentiate between esm and bundler distributables (597c249)
next-test-api-route-handler - v2.3.2

Published by Xunnamius almost 3 years ago

2.3.2 (2021-11-07)

🪄 Fixes

  • src: es module compatibility; no longer attempts to require() in mjs files (32eafab)
  • src: report parsed es module import failures properly (cd98aab)
next-test-api-route-handler - v2.3.1

Published by Xunnamius almost 3 years ago

2.3.1 (2021-11-06)

⚙️ Build system

  • Re-enable ESM (for bundlers) integration tests (91f08d4)
next-test-api-route-handler - v2.3.0

Published by Xunnamius almost 3 years ago

2.3.0 (2021-11-05)

✨ Features

  • Automatically parse "set-cookie" headers; available in response.cookies (cd3cd95) closes #373

🪄 Fixes

  • src: ensure exceptions do not prevent Jest from exiting (8746e5f)
  • src: ensure webpack does not break dynamic require on compile (ae778d1) closes #378
  • Vastly improved error handling for those using node@<15 and/or npm@<7 (c216caa)

⚙️ Build system

  • Add back nullish coalescing operator babel transform for older node versions (5fbb6d2)
  • package: backport npm script fixes (346e8de)
  • src: fix TS bundle errors on node@12 and node@14 (812e6f2)
next-test-api-route-handler - v2.2.1

Published by Xunnamius about 3 years ago

2.2.1 (2021-08-29)

⚙️ Build system

  • license: switch to MIT license (de9ee17)
next-test-api-route-handler - v2.2.0

Published by Xunnamius about 3 years ago

2.2.0 (2021-08-22)

✨ Features

  • types: expanded typescript support; testApiHandler weakly typed by default (419d5fe)
next-test-api-route-handler - v2.1.3

Published by Xunnamius about 3 years ago

2.1.3 (2021-08-22)

🪄 Fixes

  • src: ensure dependency resolution failure does not cause test runner to hang (7916f00)
next-test-api-route-handler - v2.1.2

Published by Xunnamius about 3 years ago

2.1.2 (2021-08-14)

🪄 Fixes

  • src: memoize resolver import (74241ee)

⚙️ Build system

  • package: improve build-docs npm script (33b6a34)
  • src: add descriptions to TypeScript types (1c3425c)
next-test-api-route-handler - v2.1.1

Published by Xunnamius about 3 years ago

2.1.1 (2021-08-13)

🪄 Fixes

  • readme: update install instructions; fix apollo example (fd787ca)

⚙️ Build system

  • webpack.config: second fix for faulty env management (87ed12b)
next-test-api-route-handler - v2.1.0

Published by Xunnamius about 3 years ago

2.1.0 (2021-08-13)

✨ Features

  • src: enable backwards compatibility all the way back to next@9 (c51cf02) closes #295

⚙️ Build system

  • webpack.config: do not ignore warnings (2b14d84)
  • webpack.config: fix faulty env management (f477260)

🔥 Reverted

next-test-api-route-handler - v2.0.2

Published by Xunnamius about 3 years ago

2.0.2 (2021-07-29)

⚙️ Build system

  • external-scripts: use latest mongodb native driver (fd53fef)
  • webpack.config.js: more robust build process (e5c6a99)
next-test-api-route-handler - v2.0.1

Published by Xunnamius over 3 years ago

2.0.1 (2021-06-27)

⚙️ Build system

  • Update dependencies and publish fixed apollo example (ef32668)