Skip to content

Commit

Permalink
tweak comments
Browse files Browse the repository at this point in the history
  • Loading branch information
handeyeco committed Sep 24, 2024
1 parent 4fd4235 commit 2437282
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 3 additions & 1 deletion packages/perseus/src/widgets/radio/radio-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ export type RenderProps = {
};

export type UserInput = {
countChoices?: boolean;
choicesSelected: ReadonlyArray<boolean>;
// I wonder if UserInput should only be `choicesSelected`
// and everything else should just be on the rubric
countChoices?: boolean;
numCorrect?: number;
noneOfTheAboveIndex?: number | null | undefined;
noneOfTheAboveSelected?: boolean;
Expand Down
6 changes: 0 additions & 6 deletions packages/perseus/src/widgets/radio/radio-validator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ describe("radioValidator", () => {

it("is invalid when number selected does not match number correct", () => {
const userInput = {
// TODO: I don't think user input should have numCorrect
// (it should likely be looking for that on the rubric)
// but I'm testing the logic that currently exists
numCorrect: 2,
choicesSelected: [true, false, false, false],
};
Expand All @@ -47,9 +44,6 @@ describe("radioValidator", () => {

it("is invalid when none of the above and an answer are both selected", () => {
const userInput = {
// TODO: I don't think user input should have noneOfTheAboveSelected
// (it should likely be looking for noneOfTheAboveIndex on the rubric)
// but I'm testing the logic that currently exists
noneOfTheAboveSelected: true,
choicesSelected: [true, false, false, false, true],
};
Expand Down

0 comments on commit 2437282

Please sign in to comment.