| Index: pkg/json_rpc_2/test/server/utils.dart
|
| diff --git a/pkg/json_rpc_2/test/server/utils.dart b/pkg/json_rpc_2/test/server/utils.dart
|
| index 07f571ce6c295dda02cb63ce608b78d96d08df37..6f92c0a5456b46bb80fb4efb62c61d4c91935ac5 100644
|
| --- a/pkg/json_rpc_2/test/server/utils.dart
|
| +++ b/pkg/json_rpc_2/test/server/utils.dart
|
| @@ -8,9 +8,10 @@ import 'package:unittest/unittest.dart';
|
| import 'package:json_rpc_2/json_rpc_2.dart' as json_rpc;
|
|
|
| void expectErrorResponse(json_rpc.Server server, request, int errorCode,
|
| - String message) {
|
| + String message, {data}) {
|
| var id;
|
| if (request is Map) id = request['id'];
|
| + if (data == null) data = {'request': request};
|
|
|
| expect(server.handleRequest(request), completion(equals({
|
| 'jsonrpc': '2.0',
|
| @@ -18,7 +19,7 @@ void expectErrorResponse(json_rpc.Server server, request, int errorCode,
|
| 'error': {
|
| 'code': errorCode,
|
| 'message': message,
|
| - 'data': {'request': request}
|
| + 'data': data
|
| }
|
| })));
|
| }
|
|
|