diff options
author | Kermit Xuan <kermitlx@outlook.com> | 2020-06-13 22:14:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-13 10:14:31 -0400 |
commit | 77545219a6d5c9d474032ea5e8ccfcd69897d76b (patch) | |
tree | 17c9a2b1486507066952423e375ad3bc2600b004 /cli/tests/unit | |
parent | f6fa65938437385a4ec00ec090f797381f6638b7 (diff) |
fix: DatagramConn.send should return bytes sent (#6265)
Diffstat (limited to 'cli/tests/unit')
-rw-r--r-- | cli/tests/unit/net_test.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/tests/unit/net_test.ts b/cli/tests/unit/net_test.ts index cda5a536e..9228315d8 100644 --- a/cli/tests/unit/net_test.ts +++ b/cli/tests/unit/net_test.ts @@ -240,7 +240,9 @@ unitTest( assertEquals(bob.addr.hostname, "127.0.0.1"); const sent = new Uint8Array([1, 2, 3]); - await alice.send(sent, bob.addr); + const byteLength = await alice.send(sent, bob.addr); + + assertEquals(byteLength, 3); const [recvd, remote] = await bob.receive(); assert(remote.transport === "udp"); |