1
- import { assertRejects } from "https://deno.land/[email protected] /assert/mod.ts" ;
1
+ import { assertThrows } from "https://deno.land/[email protected] /assert/mod.ts" ;
2
2
import { assertSnapshot } from "https://deno.land/[email protected] /testing/snapshot.ts" ;
3
3
import { getHostingService , UnsupportedHostingServiceError } from "./mod.ts" ;
4
4
5
5
Deno . test ( "getHostingService" , async ( t ) => {
6
- await t . step ( "throws error for unsupported hosting service" , async ( ) => {
6
+ await t . step ( "throws error for unsupported hosting service" , ( ) => {
7
7
const url = new URL ( "https://example.com/lambdalisue/deno-git-browse" ) ;
8
- await assertRejects (
8
+ assertThrows (
9
9
( ) => {
10
10
return getHostingService ( url ) ;
11
11
} ,
@@ -22,7 +22,7 @@ Deno.test("getHostingService", async (t) => {
22
22
new URL ( "https://bitbucket.org/lambdalisue/deno-git-browse" ) ,
23
23
] ;
24
24
for ( const url of urls ) {
25
- const svc = await getHostingService ( url ) ;
25
+ const svc = getHostingService ( url ) ;
26
26
27
27
await t . step ( `getHomeURL for ${ url } ` , async ( ) => {
28
28
const result = await svc . getHomeURL ( url ) ;
@@ -134,7 +134,7 @@ Deno.test("getHostingService with alias", async (t) => {
134
134
} ;
135
135
136
136
for ( const url of urls ) {
137
- const svc = await getHostingService ( url , { aliases } ) ;
137
+ const svc = getHostingService ( url , { aliases } ) ;
138
138
139
139
await t . step ( `getHomeURL for ${ url } ` , async ( ) => {
140
140
const result = await svc . getHomeURL ( url ) ;
0 commit comments