dartfmt code and use latest pkg:test API
diff --git a/lib/src/copy/web_socket_impl.dart b/lib/src/copy/web_socket_impl.dart
index 58bcaba..a11072d 100644
--- a/lib/src/copy/web_socket_impl.dart
+++ b/lib/src/copy/web_socket_impl.dart
@@ -467,12 +467,13 @@
void addFrame(int opcode, List<int> data) {
createFrame(
- opcode,
- data,
- webSocket._serverSide,
- // Logic around _deflateHelper was removed here, since ther ewill never
- // be a deflate helper for a cross-platform WebSocket client.
- false).forEach((e) {
+ opcode,
+ data,
+ webSocket._serverSide,
+ // Logic around _deflateHelper was removed here, since ther ewill never
+ // be a deflate helper for a cross-platform WebSocket client.
+ false)
+ .forEach((e) {
_eventSink.add(e);
});
}
diff --git a/pubspec.yaml b/pubspec.yaml
index 32252a0..86236b7 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -13,4 +13,4 @@
stream_channel: '^1.2.0'
dev_dependencies:
- test: '^0.12.18'
+ test: ^1.2.0
diff --git a/test/html_test.dart b/test/html_test.dart
index 83f112f..3ac49bc 100644
--- a/test/html_test.dart
+++ b/test/html_test.dart
@@ -113,7 +113,7 @@
var channel = new HtmlWebSocketChannel.connect(
"ws://localhost:${await serverChannel.stream.first}");
expect(channel.stream.toList(),
- throwsA(new isInstanceOf<WebSocketChannelException>()));
+ throwsA(new TypeMatcher<WebSocketChannelException>()));
});
}
diff --git a/test/io_test.dart b/test/io_test.dart
index dfa718d..5d0d433 100644
--- a/test/io_test.dart
+++ b/test/io_test.dart
@@ -98,6 +98,6 @@
var channel =
new IOWebSocketChannel.connect("ws://localhost:${server.port}");
expect(channel.stream.toList(),
- throwsA(new isInstanceOf<WebSocketChannelException>()));
+ throwsA(new TypeMatcher<WebSocketChannelException>()));
});
}
diff --git a/test/web_socket_test.dart b/test/web_socket_test.dart
index 68d6b35..f2f263f 100644
--- a/test/web_socket_test.dart
+++ b/test/web_socket_test.dart
@@ -64,8 +64,8 @@
..set("Upgrade", "websocket")
..set(
"Sec-WebSocket-Accept",
- WebSocketChannel
- .signKey(request.headers.value('Sec-WebSocket-Key')));
+ WebSocketChannel.signKey(
+ request.headers.value('Sec-WebSocket-Key')));
response.contentLength = 0;
var socket = await response.detachSocket();