patch json request test

This commit is contained in:
sneurlax 2024-01-26 15:59:18 -06:00
parent 3c8e220303
commit 0ff37d1e3e

View file

@ -55,11 +55,13 @@ void main() {
const jsonRequestString =
'{"jsonrpc": "2.0", "id": "some id","method": "server.ping","params": []}';
expect(
() => jsonRPC.request(
jsonRequestString,
const Duration(seconds: 1),
),
throwsA(isA<SocketException>()));
await expectLater(
jsonRPC.request(
jsonRequestString,
const Duration(seconds: 1),
),
throwsA(isA<Exception>()
.having((e) => e.toString(), 'message', contains("Request timeout"))),
);
});
}