mirror of
https://github.com/KeygraphHQ/juice-shop.git
synced 2026-11-10 02:31:39 -10:00
26 lines
626 B
TypeScript
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 })
|
|
})
|
|
})
|