@@ -12,7 +12,7 @@ import Elysia from "elysia";
12
12
import { refresh } from "./refresh" ;
13
13
14
14
describe ( "Unit/endpoints/refresh" , ( ) => {
15
- const plugin = refresh ;
15
+ const endpoints = refresh ;
16
16
const responseBody = {
17
17
id_token : "mock-id-token" ,
18
18
access_token : "mock-access-token" ,
@@ -38,7 +38,7 @@ describe("Unit/endpoints/refresh", () => {
38
38
sessionId : "mock-sid" ,
39
39
refreshToken : "mock-refresh-token" ,
40
40
} ;
41
- const app = new Elysia ( ) . use ( plugin . call ( mockClient ( session , true ) ) ) ;
41
+ const app = new Elysia ( ) . use ( endpoints . call ( mockClient ( session , true ) ) ) ;
42
42
43
43
const response = await app . handle (
44
44
new Request ( `http://localhost${ path } ` , getInit ) ,
@@ -49,7 +49,7 @@ describe("Unit/endpoints/refresh", () => {
49
49
} ) ;
50
50
51
51
test ( "Session missing" , async ( ) => {
52
- const app = new Elysia ( ) . use ( plugin . call ( mockClient ( null , true ) ) ) ;
52
+ const app = new Elysia ( ) . use ( endpoints . call ( mockClient ( null , true ) ) ) ;
53
53
54
54
const response = await app . handle (
55
55
new Request ( `http://localhost${ path } ` , getInit ) ,
@@ -59,7 +59,7 @@ describe("Unit/endpoints/refresh", () => {
59
59
60
60
test ( "Refresh token missing" , async ( ) => {
61
61
const session = { sessionId : "mock-sid" } ;
62
- const app = new Elysia ( ) . use ( plugin . call ( mockClient ( session , true ) ) ) ;
62
+ const app = new Elysia ( ) . use ( endpoints . call ( mockClient ( session , true ) ) ) ;
63
63
64
64
const response = await app . handle (
65
65
new Request ( `http://localhost${ path } ` , getInit ) ,
@@ -72,7 +72,7 @@ describe("Unit/endpoints/refresh", () => {
72
72
sessionId : "mock-sid" ,
73
73
refreshToken : "mock-refresh-token" ,
74
74
} ;
75
- const app = new Elysia ( ) . use ( plugin . call ( mockClient ( session , false ) ) ) ;
75
+ const app = new Elysia ( ) . use ( endpoints . call ( mockClient ( session , false ) ) ) ;
76
76
77
77
const response = await app . handle (
78
78
new Request ( `http://localhost${ path } ` , getInit ) ,
0 commit comments