import * as request from 'supertest' ; import { TestStatics } from '../common/test-statics' ; const testAdminEmail = TestStatics . adminEmail ; const testAdminPassword = TestStatics . adminPassword ; const accountLoginApiUrl = '/accounts/auth/login' ; export async function adminLogin ( httpServer ) { let authToken = null ; await request ( httpServer ) . post ( accountLoginApiUrl ) . send ( { email : testAdminEmail , password : testAdminPassword } ) . expect ( function ( res ) { authToken = res . body . accessToken ; } ) ; return authToken ; } export async function userLogin ( httpServer ) { let authToken = null ; await request ( httpServer ) . post ( accountLoginApiUrl ) . send ( { email : TestStatics . userEmail , password : TestStatics . userPassword } ) . expect ( function ( res ) { authToken = res . body . accessToken ; } ) ; return authToken ; } export const isRefreshToken = ( refreshToken ) => { return true ; } ; export const isAccessToken = ( accessToken ) => { return true ; } ;