diff options
author | Andrey Trebler <at@edrilling.no> | 2020-05-04 18:27:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-04 12:27:06 -0400 |
commit | 796fc9bc3e8e4da7d53fb4617511ce4e2be22485 (patch) | |
tree | d2c140fcfb95a102b4b7b241f8edfe8fc7a971fe /std/examples/chat/server_test.ts | |
parent | 38ecabf205336c2cf51f2a18919da3dcb1a7db97 (diff) |
BREAKING: make WebSocket directly implement AsyncIterable (#5044) (#5045)
Diffstat (limited to 'std/examples/chat/server_test.ts')
-rw-r--r-- | std/examples/chat/server_test.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/std/examples/chat/server_test.ts b/std/examples/chat/server_test.ts index d1c1a8afa..92eb50f92 100644 --- a/std/examples/chat/server_test.ts +++ b/std/examples/chat/server_test.ts @@ -59,7 +59,8 @@ test({ let ws: WebSocket | undefined; try { ws = await connectWebSocket("http://127.0.0.1:8080/ws"); - const it = ws.receive(); + const it = ws[Symbol.asyncIterator](); + assertEquals((await it.next()).value, "Connected: [1]"); ws.send("Hello"); assertEquals((await it.next()).value, "[1]: Hello"); |