-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Refactor makeResult function and form handling in Trial com…
…ponent (#1254) * type: Refactor checkBreakRound function to use explicit types for parameters * refactor: Move `form` related expressions to inside the `feedback_form` check as form is only utilized from within that if statement * refactor: Utilize early return if `feedback_form` is not defined * refactor: Simplify `form` assignment as we can be sure that `feedback_form` is always defined here * refactor: Initialize form as empty array if undefined and add test scenarios for it * fix: Fix assertions in tests * refactor: Simplify break round condition in Trial component
- Loading branch information
1 parent
e7eed32
commit 83ac6c1
Showing
3 changed files
with
114 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
interface BreakRoundOn { | ||
EQUALS?: string[]; | ||
NOT?: string[]; | ||
} | ||
|
||
export interface TrialConfig { | ||
response_time: number; | ||
auto_advance: boolean; | ||
listen_first: boolean; | ||
show_continue_button: boolean; | ||
continue_label: string; | ||
style: string; | ||
break_round_on: any; | ||
break_round_on: BreakRoundOn; | ||
|
||
auto_advance_timer: number | null; | ||
} |