The Wayback Machine - https://web.archive.org/web/20210920213716/https://github.com/topics/router-middleware
Skip to content
#

router-middleware

Here are 3 public repositories matching this topic...

Language: All
Filter by language
Some-Dood
Some-Dood commented Aug 6, 2021

Hello there! After some experimentation with the mocking API, I discovered that mocked contexts do not provide a mocked Cookies instance. Suppose we wanted to test the following middleware:

// session.ts
// Explicit type annotations omitted for brevity...
export function checkSession(ctx) {
    const maybeSessionId = ctx.cookies.get('sid');
    ctx.assert(maybeSessionId, St

Improve this page

Add a description, image, and links to the router-middleware topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the router-middleware topic, visit your repo's landing page and select "manage topics."

Learn more