1
1
import { describe , it , expect } from "vitest" ;
2
2
import { countSubstring , parseRemoteAuthority , toSafeHost } from "./util" ;
3
3
4
- it ( "ignore unrelated authorities" , async ( ) => {
4
+ it ( "ignore unrelated authorities" , ( ) => {
5
5
const tests = [
6
6
"vscode://ssh-remote+some-unrelated-host.com" ,
7
7
"vscode://ssh-remote+coder-vscode" ,
@@ -15,7 +15,7 @@ it("ignore unrelated authorities", async () => {
15
15
}
16
16
} ) ;
17
17
18
- it ( "should error on invalid authorities" , async ( ) => {
18
+ it ( "should error on invalid authorities" , ( ) => {
19
19
const tests = [
20
20
"vscode://ssh-remote+coder-vscode--foo" ,
21
21
"vscode://ssh-remote+coder-vscode--" ,
@@ -27,7 +27,7 @@ it("should error on invalid authorities", async () => {
27
27
}
28
28
} ) ;
29
29
30
- it ( "should parse authority" , async ( ) => {
30
+ it ( "should parse authority" , ( ) => {
31
31
expect (
32
32
parseRemoteAuthority ( "vscode://ssh-remote+coder-vscode--foo--bar" ) ,
33
33
) . toStrictEqual ( {
@@ -81,7 +81,7 @@ it("should parse authority", async () => {
81
81
} ) ;
82
82
} ) ;
83
83
84
- it ( "escapes url host" , async ( ) => {
84
+ it ( "escapes url host" , ( ) => {
85
85
expect ( toSafeHost ( "https://foobar:8080" ) ) . toBe ( "foobar" ) ;
86
86
expect ( toSafeHost ( "https://ほげ" ) ) . toBe ( "xn--18j4d" ) ;
87
87
expect ( toSafeHost ( "https://test.😉.invalid" ) ) . toBe ( "test.xn--n28h.invalid" ) ;
0 commit comments