Updated test
This commit is contained in:
parent
335e1a9907
commit
0d294adb20
4 changed files with 48 additions and 28 deletions
|
@ -1,35 +1,54 @@
|
|||
# 4.0.2
|
||||
# Change Log
|
||||
|
||||
## 4.0.3
|
||||
|
||||
* Updated README
|
||||
* Fixed NNBD issue
|
||||
|
||||
## 4.0.2
|
||||
|
||||
* Resolved static analysis warnings
|
||||
|
||||
# 4.0.1
|
||||
## 4.0.1
|
||||
|
||||
* Updated AUTHORS and LICENSE
|
||||
|
||||
# 4.0.0
|
||||
## 4.0.0
|
||||
|
||||
* Migrated to support Dart SDK 2.12.x NNBD
|
||||
|
||||
# 3.0.0
|
||||
## 3.0.0
|
||||
|
||||
* Migrated to work with Dart SDK 2.12.x Non NNBD
|
||||
|
||||
# 2.0.1
|
||||
## 2.0.1
|
||||
|
||||
* Update badge.
|
||||
* Handle userInfo + basic auth.
|
||||
|
||||
# 2.0.0
|
||||
## 2.0.0
|
||||
|
||||
* Update to work with `client@2`.
|
||||
|
||||
# 2.0.0-alpha.4
|
||||
# 2.0.0-alpha.3
|
||||
## 2.0.0-alpha.4
|
||||
|
||||
## 2.0.0-alpha.3
|
||||
|
||||
* Update `http` dependency.
|
||||
|
||||
# 2.0.0-alpha.2
|
||||
## 2.0.0-alpha.2
|
||||
|
||||
* Explicitly import `package:angel_framework/http.dart`.
|
||||
|
||||
# 2.0.0-alpha.1
|
||||
## 2.0.0-alpha.1
|
||||
|
||||
* Update for compliance with newer `angel_client`.
|
||||
|
||||
# 2.0.0-alpha
|
||||
## 2.0.0-alpha
|
||||
|
||||
* Depend on Dart 2 and Angel 2.
|
||||
|
||||
# 1.1.0+1
|
||||
## 1.1.0+1
|
||||
|
||||
* Dart 2/strong mode fixes.
|
||||
* Pass a `useZone` flag to `AngelHttp` through `TestServer`.
|
||||
* Pass a `useZone` flag to `AngelHttp` through `TestServer`.
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
# angel3_test
|
||||
[![version](https://img.shields.io/badge/pub-v4.0.2-brightgreen)](https://pub.dartlang.org/packages/angel3_test)
|
||||
# Angel3 Testing Library
|
||||
|
||||
[![version](https://img.shields.io/badge/pub-v4.0.3-brightgreen)](https://pub.dartlang.org/packages/angel3_test)
|
||||
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
||||
[![Gitter](https://img.shields.io/gitter/room/angel_dart/discussion)](https://gitter.im/angel_dart/discussion)
|
||||
|
||||
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/test/LICENSE)
|
||||
|
||||
Testing utility library for the Angel framework.
|
||||
Testing utility library for the Angel3 framework.
|
||||
|
||||
## TestClient
|
||||
|
||||
# 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.
|
||||
|
@ -26,7 +28,8 @@ ws.service('api/users').onCreated.listen(...);
|
|||
ws.onData.listen(...);
|
||||
```
|
||||
|
||||
# Matchers
|
||||
## Matchers
|
||||
|
||||
Several `Matcher`s are bundled with this package, and run on any `package:http` `Response`,
|
||||
not just those returned by Angel.
|
||||
|
||||
|
@ -53,12 +56,9 @@ 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](https://github.com/dukefirehawk/angel/tree/angel3/packages/validate).
|
||||
`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](https://github.com/dukefirehawk/angel/tree/angel3/packages/validate).
|
||||
|
||||
Angel provides a comprehensive validation library that integrates tightly
|
||||
with the very `matcher` package that you already use for testing.
|
||||
Angel provides a comprehensive validation library that integrates tightly with the very `matcher` package that you already use for testing.
|
||||
|
||||
[`package:angel3_validate`](https://github.com/dukefirehawk/angel/tree/angel3/packages//validate)
|
||||
|
||||
|
@ -72,4 +72,4 @@ test('validate response', () async {
|
|||
'nested': someNestedValidator
|
||||
})));
|
||||
});
|
||||
```
|
||||
```
|
||||
|
|
|
@ -176,7 +176,7 @@ class _MockService<Id, Data> extends client.BaseAngelService<Id, Data> {
|
|||
|
||||
_MockService(this._app, String basePath,
|
||||
{client.AngelDeserializer<Data>? deserializer})
|
||||
: super(null, _app, basePath, deserializer: deserializer);
|
||||
: super(_app, _app, basePath, deserializer: deserializer);
|
||||
|
||||
@override
|
||||
Future<StreamedResponse> send(http.BaseRequest request) {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
name: angel3_test
|
||||
version: 4.0.2
|
||||
description: Testing utility library for the Angel framework. Use with package:test.
|
||||
homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/test
|
||||
version: 4.0.3
|
||||
description: Testing utility library for the Angel3 framework. Use with package:test.
|
||||
homepage: https://angel3-framework.web.app/
|
||||
repository: https://github.com/dukefirehawk/angel/tree/angel3/packages/test
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
dependencies:
|
||||
|
|
Loading…
Reference in a new issue