mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
feat: split TeamSpeak address and port inputs
This commit is contained in:
1 parent
bf1158aff2
commit
3ec9ab497a
7 files changed
+144
-42
No files matched your search
@@ -17,6 +17,11 @@ describe("TeamSpeak target parser", () => {
|
||||
assert.deepEqual(parseTeamSpeakTarget("ts.example.com:9988"), { host: "ts.example.com", port: 9988 });
|
||||
});
|
||||
|
||||
it("parses the address#port form used by the web fields", () => {
|
||||
assert.deepEqual(parseTeamSpeakTarget("ts.example.com#9988"), { host: "ts.example.com", port: 9988 });
|
||||
assert.deepEqual(parseTeamSpeakTarget("[2001:DB8::1]#9988"), { host: "2001:db8::1", port: 9988 });
|
||||
});
|
||||
|
||||
it("supports bracketed IPv6", () => {
|
||||
const target = parseTeamSpeakTarget("[2001:DB8::1]:9987");
|
||||
assert.deepEqual(target, { host: "2001:db8::1", port: 9987 });
|
||||
|
||||
Reference in new issue
Block a user