mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-12 16:48:12 +00:00
add test case for #628
This commit is contained in:
parent
637d87ecf6
commit
d8ce2dbd65
30
tests/jsPsych/default-parameters.test.js
Normal file
30
tests/jsPsych/default-parameters.test.js
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
const root = '../../';
|
||||||
|
const utils = require('../testing-utils.js');
|
||||||
|
|
||||||
|
beforeEach(function(){
|
||||||
|
require(root + 'jspsych.js');
|
||||||
|
require(root + 'plugins/jspsych-survey-text.js');
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('nested defaults', function(){
|
||||||
|
test('work in basic situation', function(){
|
||||||
|
var t = {
|
||||||
|
type: 'survey-text',
|
||||||
|
questions: [
|
||||||
|
{
|
||||||
|
prompt: 'Question 1.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prompt: 'Question 2.'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
jsPsych.init({timeline: [t]})
|
||||||
|
|
||||||
|
var display = jsPsych.getDisplayElement();
|
||||||
|
|
||||||
|
expect(display.querySelector('input').placeholder).toBe("")
|
||||||
|
expect(display.querySelector('input').size).toBe(40)
|
||||||
|
});
|
||||||
|
})
|
Loading…
Reference in New Issue
Block a user