Files
juice-shop/test/api/languagesSpec.ts
2025-03-17 21:32:30 +01:00

26 lines
660 B
TypeScript

/*
* Copyright (c) 2014-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
* SPDX-License-Identifier: MIT
*/
import * as frisby from 'frisby'
const Joi = frisby.Joi
const REST_URL = 'http://localhost:3000/rest'
describe('/rest/languages', () => {
it('GET all languages', () => {
return frisby.get(REST_URL + '/languages')
.expect('status', 200)
.expect('header', 'content-type', /application\/json/)
.expect('jsonTypes', '*', {
key: Joi.string(),
lang: Joi.string(),
icons: Joi.array(),
percentage: Joi.number(),
shortKey: Joi.string(),
gauge: Joi.string()
})
})
})