Files
juice-shop/test/server/appConfigurationSpec.ts
2025-03-23 17:07:10 +01:00

26 lines
626 B
TypeScript

/*
* Copyright (c) 2014-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
* SPDX-License-Identifier: MIT
*/
import sinon from 'sinon'
import chai from 'chai'
import sinonChai from 'sinon-chai'
import config from 'config'
import { retrieveAppConfiguration } from '../../routes/appConfiguration'
const expect = chai.expect
chai.use(sinonChai)
describe('appConfiguration', () => {
let req: any
let res: any
it('should return configuration object', () => {
req = {}
res = { json: sinon.spy() }
retrieveAppConfiguration()(req, res)
expect(res.json).to.have.been.calledWith({ config })
})
})