Close send channel in test (#54)

Without closing this channel the VM will not exit. Refactor to
`async/await` so that we can close the channel only after receiving the
expected items. This allows running the test directly in the VM without
the test runner.
1 file changed
tree: d355261c9175f3d5bb2e729beea2155217181afa
  1. lib/
  2. test/
  3. .gitignore
  4. .test_config
  5. .travis.yml
  6. analysis_options.yaml
  7. AUTHORS
  8. CHANGELOG.md
  9. CONTRIBUTING.md
  10. LICENSE
  11. pubspec.yaml
  12. README.md
README.md

This package exposes the StreamChannel interface, which represents a two-way communication channel. Each StreamChannel exposes a Stream for receiving data and a StreamSink for sending it.

StreamChannel helps abstract communication logic away from the underlying protocol. For example, the test package re-uses its test suite communication protocol for both WebSocket connections to browser suites and Isolate connections to VM tests.

This package also contains utilities for dealing with StreamChannels and with two-way communications in general. For documentation of these utilities, see the API docs.