File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
packages/jspsych/src/timeline Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -704,6 +704,20 @@ describe("Trial", () => {
704
704
expect ( trial . getResult ( ) ) . toEqual ( expect . objectContaining ( { my : "result" } ) ) ;
705
705
expect ( trial . getResults ( ) ) . toEqual ( [ expect . objectContaining ( { my : "result" } ) ] ) ;
706
706
} ) ;
707
+
708
+ it ( "does not return the result when the `record_data` trial parameter is `false`" , async ( ) => {
709
+ TestPlugin . setManualFinishTrialMode ( ) ;
710
+ const trial = createTrial ( { type : TestPlugin , record_data : false } ) ;
711
+ trial . run ( ) ;
712
+
713
+ expect ( trial . getResult ( ) ) . toBeUndefined ( ) ;
714
+ expect ( trial . getResults ( ) ) . toEqual ( [ ] ) ;
715
+
716
+ await TestPlugin . finishTrial ( ) ;
717
+
718
+ expect ( trial . getResult ( ) ) . toBeUndefined ( ) ;
719
+ expect ( trial . getResults ( ) ) . toEqual ( [ ] ) ;
720
+ } ) ;
707
721
} ) ;
708
722
709
723
describe ( "evaluateTimelineVariable()" , ( ) => {
You can’t perform that action at this time.
0 commit comments