Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing_return violation newly enforced in Dart ~2.3.2-dev.0.1 #117

Merged
merged 1 commit into from May 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/io_server_test.dart
Expand Up @@ -39,8 +39,8 @@ void main() {
});

test("disallows more than one handler from being mounted", () async {
server.mount((_) {});
expect(() => server.mount((_) {}), throwsStateError);
expect(() => server.mount((_) {}), throwsStateError);
server.mount((_) => null);
expect(() => server.mount((_) => null), throwsStateError);
expect(() => server.mount((_) => null), throwsStateError);
});
}
8 changes: 4 additions & 4 deletions test/server_handler_test.dart
Expand Up @@ -40,7 +40,7 @@ void main() {

test("stops servicing requests after Server.close is called", () {
var serverHandler = ServerHandler(localhostUri);
serverHandler.server.mount(expectAsync1((_) {}, count: 0));
serverHandler.server.mount(expectAsync1((_) => null, count: 0));
serverHandler.server.close();

expect(makeSimpleRequest(serverHandler.handler), throwsStateError);
Expand Down Expand Up @@ -70,8 +70,8 @@ void main() {

test("doesn't allow Server.mount to be called multiple times", () {
var serverHandler = ServerHandler(localhostUri);
serverHandler.server.mount((_) {});
expect(() => serverHandler.server.mount((_) {}), throwsStateError);
expect(() => serverHandler.server.mount((_) {}), throwsStateError);
serverHandler.server.mount((_) => null);
expect(() => serverHandler.server.mount((_) => null), throwsStateError);
expect(() => serverHandler.server.mount((_) => null), throwsStateError);
});
}
1 change: 1 addition & 0 deletions test/shelf_io_test.dart
Expand Up @@ -216,6 +216,7 @@ void main() {
.codeUnits);
channel.sink.close();
}));
return null;
});

var response = await _post(body: "Hello");
Expand Down