mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-12 08:38:11 +00:00
fix failing tests: change key_press to response
This commit is contained in:
parent
d2f64ada1c
commit
584e03f7b0
@ -54,8 +54,8 @@ describe('data conversion to csv', function(){
|
||||
utils.pressKey('q');
|
||||
expect(jsPsych.getDisplayElement().innerHTML).toBe('');
|
||||
|
||||
var csv_data = jsPsych.data.get().ignore(['rt','internal_node_id','time_elapsed','trial_type','rt_stim1','key_press_stim1']).csv();
|
||||
expect(csv_data).toBe('"answer","correct","stimulus","key_press","trial_index"\r\n"different","false","[""<p>Climbing</p>"",""<p>Walking</p>""]","q","0"\r\n')
|
||||
var csv_data = jsPsych.data.get().ignore(['rt','internal_node_id','time_elapsed','trial_type','rt_stim1','response_stim1']).csv();
|
||||
expect(csv_data).toBe('"answer","correct","stimulus","response","trial_index"\r\n"different","false","[""<p>Climbing</p>"",""<p>Walking</p>""]","q","0"\r\n')
|
||||
})
|
||||
|
||||
test('survey-multi-select response array is correctly converted', function(){
|
||||
|
@ -55,8 +55,8 @@ describe('data conversion to json', function(){
|
||||
utils.pressKey('q');
|
||||
expect(jsPsych.getDisplayElement().innerHTML).toBe('');
|
||||
|
||||
var json_data = jsPsych.data.get().ignore(['rt','internal_node_id','time_elapsed','trial_type','rt_stim1','key_press_stim1']).json();
|
||||
expect(json_data).toBe(JSON.stringify([{answer: 'different', correct: false, stimulus: ['<p>Climbing</p>','<p>Walking</p>'], key_press: 'q', trial_index: 0}]));
|
||||
var json_data = jsPsych.data.get().ignore(['rt','internal_node_id','time_elapsed','trial_type','rt_stim1','response_stim1']).json();
|
||||
expect(json_data).toBe(JSON.stringify([{answer: 'different', correct: false, stimulus: ['<p>Climbing</p>','<p>Walking</p>'], response: 'q', trial_index: 0}]));
|
||||
})
|
||||
|
||||
test('survey-multi-select response array is correctly converted', function(){
|
||||
|
Loading…
Reference in New Issue
Block a user