mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-12 08:38:11 +00:00
relocate tests on core library
This commit is contained in:
parent
243c49dc74
commit
c112f930c1
@ -1,11 +1,13 @@
|
||||
const utils = require('./testing-utils.js');
|
||||
const utils = require('../testing-utils.js');
|
||||
|
||||
beforeEach(function(){
|
||||
require('../../jspsych.js');
|
||||
require('../../plugins/jspsych-html-keyboard-response.js');
|
||||
})
|
||||
|
||||
describe('on_finish (trial)', function(){
|
||||
test('should get an object of data generated by the trial', function(){
|
||||
|
||||
require('../jspsych.js');
|
||||
require('../plugins/jspsych-html-keyboard-response.js');
|
||||
|
||||
return (new Promise(function(resolve, reject){
|
||||
|
||||
var key_data = null;
|
||||
@ -32,9 +34,6 @@ describe('on_finish (trial)', function(){
|
||||
|
||||
test('should be able to write to the data', function(){
|
||||
|
||||
require('../jspsych.js');
|
||||
require('../plugins/jspsych-html-keyboard-response.js');
|
||||
|
||||
return (new Promise(function(resolve, reject){
|
||||
|
||||
var promise_data = {};
|
||||
@ -67,9 +66,7 @@ describe('on_finish (trial)', function(){
|
||||
describe('on_start (trial)', function(){
|
||||
|
||||
test('should get trial data with function parameters evaluated', function(){
|
||||
require('../jspsych.js');
|
||||
require('../plugins/jspsych-html-keyboard-response.js');
|
||||
|
||||
|
||||
return (new Promise(function(resolve, reject){
|
||||
|
||||
var d = null;
|
||||
@ -95,9 +92,7 @@ describe('on_start (trial)', function(){
|
||||
});
|
||||
|
||||
test('should get trial data with timeline variables evaluated', function(){
|
||||
require('../jspsych.js');
|
||||
require('../plugins/jspsych-html-keyboard-response.js');
|
||||
|
||||
|
||||
return (new Promise(function(resolve, reject){
|
||||
|
||||
var d = null;
|
||||
@ -128,9 +123,7 @@ describe('on_start (trial)', function(){
|
||||
|
||||
describe('on_trial_finish (experiment level)', function(){
|
||||
test('should get an object containing the trial data', function(){
|
||||
require('../jspsych.js');
|
||||
require('../plugins/jspsych-html-keyboard-response.js');
|
||||
|
||||
|
||||
return (new Promise(function(resolve, reject){
|
||||
|
||||
var promise_data = {};
|
||||
@ -159,9 +152,7 @@ describe('on_trial_finish (experiment level)', function(){
|
||||
});
|
||||
|
||||
test('should allow writing to the data object', function(){
|
||||
require('../jspsych.js');
|
||||
require('../plugins/jspsych-html-keyboard-response.js');
|
||||
|
||||
|
||||
return (new Promise(function(resolve, reject){
|
||||
|
||||
var promise_data = {};
|
||||
@ -193,9 +184,7 @@ describe('on_trial_finish (experiment level)', function(){
|
||||
|
||||
describe('on_data_update', function(){
|
||||
test('should get an object containing the trial data', function(){
|
||||
require('../jspsych.js');
|
||||
require('../plugins/jspsych-html-keyboard-response.js');
|
||||
|
||||
|
||||
return (new Promise(function(resolve, reject){
|
||||
|
||||
var promise_data = {};
|
||||
@ -224,9 +213,7 @@ describe('on_data_update', function(){
|
||||
});
|
||||
|
||||
test('should contain data added with on_finish (trial level)', function(){
|
||||
require('../jspsych.js');
|
||||
require('../plugins/jspsych-html-keyboard-response.js');
|
||||
|
||||
|
||||
return (new Promise(function(resolve, reject){
|
||||
|
||||
var promise_data = {};
|
||||
@ -258,9 +245,7 @@ describe('on_data_update', function(){
|
||||
});
|
||||
|
||||
test('should contain data added with on_trial_finish (experiment level)', function(){
|
||||
require('../jspsych.js');
|
||||
require('../plugins/jspsych-html-keyboard-response.js');
|
||||
|
||||
|
||||
return (new Promise(function(resolve, reject){
|
||||
|
||||
var promise_data = {};
|
||||
@ -295,9 +280,7 @@ describe('on_data_update', function(){
|
||||
describe('on_trial_start', function(){
|
||||
|
||||
test('should get an object containing the trial properties', function(){
|
||||
require('../jspsych.js');
|
||||
require('../plugins/jspsych-html-keyboard-response.js');
|
||||
|
||||
|
||||
return (new Promise(function(resolve, reject){
|
||||
|
||||
var promise_data = {};
|
||||
@ -326,9 +309,7 @@ describe('on_trial_start', function(){
|
||||
});
|
||||
|
||||
test('should allow modification of the trial properties', function(){
|
||||
require('../jspsych.js');
|
||||
require('../plugins/jspsych-html-keyboard-response.js');
|
||||
|
||||
|
||||
var trial = {
|
||||
type: 'html-keyboard-response',
|
||||
stimulus: 'hello'
|
@ -1,4 +1,4 @@
|
||||
const root = '../';
|
||||
const root = '../../';
|
||||
|
||||
require(root + 'jspsych.js');
|
||||
|
@ -1,5 +1,5 @@
|
||||
const root = '../';
|
||||
const utils = require('./testing-utils.js');
|
||||
const root = '../../';
|
||||
const utils = require('../testing-utils.js');
|
||||
|
||||
beforeEach(function(){
|
||||
require(root + 'jspsych.js');
|
@ -1,5 +1,5 @@
|
||||
const root = '../';
|
||||
const utils = require('./testing-utils.js');
|
||||
const root = '../../';
|
||||
const utils = require('../testing-utils.js');
|
||||
|
||||
beforeEach(function(){
|
||||
require(root + 'jspsych.js');
|
@ -1,5 +1,5 @@
|
||||
const root = '../';
|
||||
const utils = require('./testing-utils.js');
|
||||
const root = '../../';
|
||||
const utils = require('../testing-utils.js');
|
||||
|
||||
beforeEach(function(){
|
||||
require(root + 'jspsych.js');
|
Loading…
Reference in New Issue
Block a user