question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing property `handledRequests`

See original GitHub issue

This has been mentioned in the ticket https://github.com/miragejs/miragejs/pull/427 It looks to be a very old issue that I’ve also encountered right now.

The documentation states that it is possible to assert against handled requests and responses, but the example doesn’t work. https://miragejs.com/docs/testing/assertions/#asserting-against-handled-requests-and-responses let requests = server.pretender.handledRequests The property handledRequests doesn’t exist.

Please update the documentation with the working example.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
terwortcommented, Sep 1, 2021

I’m facing this issue as well. We are using Typescript, and we are on the latest version (“^0.1.41”).

We are also setting trackRequest to true.

The property does exist on the object. But, it does not exist in the PretenderServer type so Typescript complains about it.

You can add // @ts-ignore to fix the error, but it’d be much appreciated if the type could be updated to include the property.

2reactions
nemonemicommented, Feb 9, 2021

“miragejs”: “~0.1.41”,

I wanted to use this feature in my tests. My setup is as follows

import { Server } from 'miragejs';
import { createServer } from '../src/mocks';

export let server: Server;

beforeEach(() => {
  // Setup the mock server
  server = createServer({ environment: 'test' });
});

afterEach(() => {
  // Tear down the mock server
  server.shutdown();
});

So when I try to access it in my test it shows that there is no such property. image

Perhaps I have simply mistyped my server variable. Is there a better way of typing it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Contact the Unclaimed Property Division
If you are having trouble verifying the status of your claim, or would like to reach the person who is handling your claim,...
Read more >
Unclaimed Property / Minnesota.gov
Unclaimed Property Unit is responsible for holding the abandoned or unclaimed funds or property until the rightful owner or heir is found.
Read more >
Hanlde missing body property in post request with NestJs
I would like to know what is the best way to handle or to prevent POST requests from a user with a missing...
Read more >
NCCASH | NCCASH
You may have free money waiting at NCCASH.com! Unclaimed property consists of bank accounts, wages, utility deposits, insurance policy proceeds, stocks, ...
Read more >
Unclaimed Property Administration - NJ Treasury - NJ.gov
If you submitted a request through the 'Request a Property Search' application, please allow up to 2 weeks to receive a response. If...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found