Update the use of 'package:shelf_web_socket's `webSocketHandler` method (#2421)

- add a 2nd argument to the closure passed into
package:shelf_web_socket's `webSocketHandler` method
- widen the dep on package:shelf_web_socket

This will allow us to add more type info to the closure that
`webSocketHandler` expects; it's currently an untyped Function. See also
https://github.com/dart-lang/shelf/issues/457 and
https://github.com/dart-lang/shelf/pull/463.

This forward declares compatibility with `3.0` of
`package:shelf_web_socket`; I _think_ this is necessary - as `dart test`
uses both package:test and package:shelf_web_socket - but happy to hear
otherwise.

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Most changes should add an entry to the changelog and may need to [rev
the pubspec package
version](https://github.com/dart-lang/sdk/blob/main/docs/External-Package-Maintenance.md#making-a-change).
- Changes to packages require [corresponding
tests](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md#Testing).

Note that many Dart repos have a weekly cadence for reviewing PRs -
please allow for some latency before initial review feedback.
</details>

---------

Co-authored-by: Jacob MacDonald <jakemac@google.com>
7 files changed
tree: e6e8784745b28ab07fd1c86b6802ed4c1ca72a4f
  1. .github/
  2. integration_tests/
  3. pkgs/
  4. tool/
  5. .gitattributes
  6. .gitignore
  7. analysis_options.yaml
  8. CONTRIBUTING.md
  9. mono_repo.yaml
  10. pubspec.yaml
  11. README.md
README.md

Dart CI OpenSSF Scorecard

What's here?

Welcome! package:test is the standard testing library for Dart and Flutter. If you have questions about Dart testing, please see the docs for package:test. package:test_api and package:test_core are implementation details and generally not user-facing.

package:checks is a relatively new library for expressing test expectations. It's a more modern version of package:matcher and features a literate API.

Packages

PackageDescriptionVersion
checksA framework for checking values against expectations and building custom expectations.pub package
fake_asyncFake asynchronous events such as timers and microtasks for deterministic testing.pub package
matcherSupport for specifying test expectations via an extensible Matcher class.pub package
testA full featured library for writing and running Dart tests across platforms.pub package
test_apipub package
test_corepub package