summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorKermit Xuan <kermitlx@outlook.com>2020-06-13 22:14:31 +0800
committerGitHub <noreply@github.com>2020-06-13 10:14:31 -0400
commit77545219a6d5c9d474032ea5e8ccfcd69897d76b (patch)
tree17c9a2b1486507066952423e375ad3bc2600b004 /cli/tests
parentf6fa65938437385a4ec00ec090f797381f6638b7 (diff)
fix: DatagramConn.send should return bytes sent (#6265)
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/unit/net_test.ts4
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");