답 입력 완료시 정답/오답 내용 출력

This commit is contained in:
2026-05-26 18:18:43 +09:00
parent 2ebb8dbc32
commit 51a96db269
6 changed files with 82 additions and 13 deletions
+10 -6
View File
@@ -36,12 +36,16 @@ describe("parenthesis sign problem engine", () => {
it("grades correct and incorrect answers", () => {
const problem = generateProblem();
expect(
gradeAnswer(problem, {
a: problem.distributedA,
b: problem.distributedB,
}).correct,
).toBe(true);
const correctResult = gradeAnswer(problem, {
a: problem.distributedA,
b: problem.distributedB,
});
expect(correctResult.correct).toBe(true);
expect(correctResult.userAnswer).toEqual([
problem.distributedA,
problem.distributedB,
]);
expect(
gradeAnswer(problem, {