You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.
In general, you should never mock dart:io HTTP classes when working with Shelf. Shelf goes to great lengths to make apps built on it server-independent. By tightly coupling to dart:io in particular, you make it so that users can't run on any other server that may come along. It also makes testing much harder; you wouldn't need any mock classes if you could just test Redstone apps by passing shelf.Requests to a shelf.Handler and receiving shelf.Responses in return.
The text was updated successfully, but these errors were encountered:
The most recent version of shelf uses
HttpHeaders.chunkedTransferEncoding
, which is not mocked by Redstone's mock class. This is causing test failures.In general, you should never mock
dart:io
HTTP classes when working with Shelf. Shelf goes to great lengths to make apps built on it server-independent. By tightly coupling todart:io
in particular, you make it so that users can't run on any other server that may come along. It also makes testing much harder; you wouldn't need any mock classes if you could just test Redstone apps by passingshelf.Request
s to ashelf.Handler
and receivingshelf.Response
s in return.The text was updated successfully, but these errors were encountered: