import 'mocha' ; import HttpStatus from '@xpring-eng/http-status' ; import * as request from 'supertest' ; import App from '../../../../src/app' ; import config from '../../../../src/config' ; import { appSetup , appCleanup } from '../../../helpers/helpers' ; let app ; const payIdServerVersion = config . app . payIdVersion ; describe ( 'E2E - publicAPIRouter - Cache Control' , function ( ) : void { before ( async function ( ) { app = await appSetup ( ) ; } ) ; it ( 'Returns a "no-store" Cache-Control header' , function ( done ) : void { const payId = '/alice' ; const acceptHeader = 'application/xrpl-mainnet+json' ; const payIdVersion = payIdServerVersion ; request ( app . publicApiExpress ) . get ( payId ) . set ( 'PayID-Version' , payIdVersion ) . set ( 'Accept' , acceptHeader ) . expect ( 'PayID-Server-Version' , payIdServerVersion ) . expect ( 'PayID-Version' , payIdVersion ) . expect ( 'Cache-Control' , 'no-store' ) . expect ( HttpStatus . OK , done ) ; } ) ; after ( function ( ) { appCleanup ( app ) ; } ) ; } ) ;