mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-30 16:01:14 -04:00
chore: update /exams response (#57157)
This commit is contained in:
@@ -573,19 +573,17 @@ describe('/exam-environment/', () => {
|
||||
expect(res.status).toBe(200);
|
||||
|
||||
expect(res.body).toStrictEqual({
|
||||
data: {
|
||||
exams: [
|
||||
{
|
||||
canTake: true,
|
||||
config: {
|
||||
name: mock.exam.config.name,
|
||||
note: mock.exam.config.note,
|
||||
totalTimeInMS: mock.exam.config.totalTimeInMS
|
||||
},
|
||||
id: mock.examId
|
||||
}
|
||||
]
|
||||
}
|
||||
exams: [
|
||||
{
|
||||
canTake: true,
|
||||
config: {
|
||||
name: mock.exam.config.name,
|
||||
note: mock.exam.config.note,
|
||||
totalTimeInMS: mock.exam.config.totalTimeInMS
|
||||
},
|
||||
id: mock.examId
|
||||
}
|
||||
]
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -599,8 +599,6 @@ async function getExams(
|
||||
});
|
||||
|
||||
return reply.send({
|
||||
data: {
|
||||
exams: availableExams
|
||||
}
|
||||
exams: availableExams
|
||||
});
|
||||
}
|
||||
|
||||
@@ -7,19 +7,17 @@ export const examEnvironmentExams = {
|
||||
response: {
|
||||
200: Type.Union([
|
||||
Type.Object({
|
||||
data: Type.Object({
|
||||
exams: Type.Array(
|
||||
Type.Object({
|
||||
id: Type.String(),
|
||||
config: Type.Object({
|
||||
name: Type.String(),
|
||||
note: Type.String(),
|
||||
totalTimeInMS: Type.Number()
|
||||
}),
|
||||
canTake: Type.Boolean()
|
||||
})
|
||||
)
|
||||
})
|
||||
exams: Type.Array(
|
||||
Type.Object({
|
||||
id: Type.String(),
|
||||
config: Type.Object({
|
||||
name: Type.String(),
|
||||
note: Type.String(),
|
||||
totalTimeInMS: Type.Number()
|
||||
}),
|
||||
canTake: Type.Boolean()
|
||||
})
|
||||
)
|
||||
}),
|
||||
STANDARD_ERROR
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user