Updated README
This commit is contained in:
parent
8f0a8155d6
commit
d641b21eac
1 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@ Testing utility library for the Angel3 framework.
|
|||
|
||||
## TestClient
|
||||
|
||||
The `TestClient` class is a custom `angel3_client` that sends mock requests to your server. This means that you will not have to bind your server to HTTP to run. Plus, it is an `angel3_client`, and thus supports services and other goodies. The `TestClient` also supports WebSockets. WebSockets cannot be mocked (yet!) within this library, so calling the `websocket()` function will also bind your server to HTTP, if it is not already listening. The return value is a `WebSockets` client instance (from [`package:angel3_websocket`](https://github.com/dukefirehawk/angel/tree/angel3/packages/websocket));
|
||||
The `TestClient` class is a custom `angel3_client` that sends mock requests to your server. This means that you will not have to bind your server to HTTP to run. Plus, it is an `angel3_client`, and thus supports services and other goodies. The `TestClient` also supports WebSockets. WebSockets cannot be mocked (yet!) within this library, so calling the `websocket()` function will also bind your server to HTTP, if it is not already listening. The return value is a `WebSockets` client instance (from [`package:angel3_websocket`](<https://pub.dev/packages/angel3_websocket>));
|
||||
|
||||
```dart
|
||||
var ws = await client.websocket('/ws');
|
||||
|
@ -46,7 +46,7 @@ void test('error', () async {
|
|||
});
|
||||
```
|
||||
|
||||
`hasValidBody` is one of the most powerful `Matcher`s in this library, because it allows you to validate a JSON body against a validation schema. Angel3 provides a comprehensive [validation library](<https://github.com/dukefirehawk/angel/tree/master/packages/validate>) that integrates tightly with the `matcher` package that you already use for testing.
|
||||
`hasValidBody` is one of the most powerful `Matcher`s in this library, because it allows you to validate a JSON body against a validation schema. Angel3 provides a comprehensive [validation library](<https://pub.dev/packages/angel3_validate>) that integrates tightly with the `matcher` package that you already use for testing.
|
||||
|
||||
```dart
|
||||
test('validate response', () async {
|
||||
|
|
Loading…
Reference in a new issue