@@ -4,17 +4,17 @@ import {
44 assertSpyCall ,
55 assertSpyCalls ,
66 assertStrictEquals ,
7+ describe ,
8+ it ,
79 Spy ,
810 spy ,
9- test ,
10- TestSuite ,
1111} from "../../test_deps.ts" ;
1212import { BodyForm , Context , Request , Response } from "./deps.ts" ;
1313import { OakOAuth2Request , OakOAuth2Response } from "./context.ts" ;
1414
15- const requestTests = new TestSuite ( { name : "OakOAuth2Request" } ) ;
15+ const requestTests = describe ( "OakOAuth2Request" ) ;
1616
17- test ( requestTests , "get" , async ( ) => {
17+ it ( requestTests , "get" , async ( ) => {
1818 const expectedBody = new URLSearchParams ( ) ;
1919 const original : Request = {
2020 url : new URL ( "https://example.com/resource/1" ) ,
@@ -35,7 +35,7 @@ test(requestTests, "get", async () => {
3535 assertStrictEquals ( await wrapped . body , expectedBody ) ;
3636} ) ;
3737
38- test ( requestTests , "post" , async ( ) => {
38+ it ( requestTests , "post" , async ( ) => {
3939 const expectedBody : URLSearchParams = new URLSearchParams ( {
4040 grant_type : "client_credentials" ,
4141 } ) ;
@@ -58,7 +58,7 @@ test(requestTests, "post", async () => {
5858 assertStrictEquals ( await wrapped . body , expectedBody ) ;
5959} ) ;
6060
61- test ( requestTests , "post with sync body error" , async ( ) => {
61+ it ( requestTests , "post with sync body error" , async ( ) => {
6262 const original : Request = {
6363 url : new URL ( "https://example.com/token" ) ,
6464 method : "POST" ,
@@ -77,7 +77,7 @@ test(requestTests, "post with sync body error", async () => {
7777 assertEquals ( await wrapped . body , new URLSearchParams ( ) ) ;
7878} ) ;
7979
80- test ( requestTests , "post with async body error" , async ( ) => {
80+ it ( requestTests , "post with async body error" , async ( ) => {
8181 const original : Request = {
8282 url : new URL ( "https://example.com/token" ) ,
8383 method : "POST" ,
@@ -97,9 +97,9 @@ test(requestTests, "post with async body error", async () => {
9797 await assertRejects ( ( ) => wrapped . body , Error , "failed" ) ;
9898} ) ;
9999
100- const responseTests = new TestSuite ( { name : "OakOAuth2Response" } ) ;
100+ const responseTests = describe ( "OakOAuth2Response" ) ;
101101
102- test ( responseTests , "redirect" , ( ) => {
102+ it ( responseTests , "redirect" , ( ) => {
103103 const original : Response = {
104104 redirect : ( _url : string | URL ) => undefined ,
105105 } as Response ;
@@ -123,7 +123,7 @@ test(responseTests, "redirect", () => {
123123 assertSpyCalls ( redirect , 2 ) ;
124124} ) ;
125125
126- test ( responseTests , "without body" , ( ) => {
126+ it ( responseTests , "without body" , ( ) => {
127127 const headers : Headers = new Headers ( { "Content-Type" : `application/json` } ) ;
128128 const original : Response = {
129129 status : 404 ,
@@ -149,7 +149,7 @@ test(responseTests, "without body", () => {
149149 assertStrictEquals ( original . body , undefined ) ;
150150} ) ;
151151
152- test ( responseTests , "with sync body value" , ( ) => {
152+ it ( responseTests , "with sync body value" , ( ) => {
153153 const headers : Headers = new Headers ( { "Content-Type" : `application/json` } ) ;
154154 const original : Response = {
155155 status : 200 ,
@@ -168,7 +168,7 @@ test(responseTests, "with sync body value", () => {
168168 assertStrictEquals ( original . body , body ) ;
169169} ) ;
170170
171- test ( responseTests , "with async body value" , ( ) => {
171+ it ( responseTests , "with async body value" , ( ) => {
172172 const headers : Headers = new Headers ( { "Content-Type" : `application/json` } ) ;
173173 const original : Response = {
174174 status : 200 ,
@@ -189,7 +189,7 @@ test(responseTests, "with async body value", () => {
189189 assertStrictEquals ( result , body ) ;
190190} ) ;
191191
192- test ( responseTests , "with body function" , ( ) => {
192+ it ( responseTests , "with body function" , ( ) => {
193193 const headers : Headers = new Headers ( { "Content-Type" : `application/json` } ) ;
194194 const original : Response = {
195195 status : 200 ,
0 commit comments