mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 19:20:55 +00:00
Fixed test to use plugin_version
This commit is contained in:
parent
1542c219d3
commit
bdf4fc3eee
@ -20,7 +20,9 @@ describe("data conversion to csv", () => {
|
|||||||
await clickTarget(document.querySelector("#jspsych-survey-text-next"));
|
await clickTarget(document.querySelector("#jspsych-survey-text-next"));
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
getData().ignore(["rt", "internal_node_id", "time_elapsed", "trial_type", "version"]).csv()
|
getData()
|
||||||
|
.ignore(["rt", "internal_node_id", "time_elapsed", "trial_type", "plugin_version"])
|
||||||
|
.csv()
|
||||||
).toBe('"response","trial_index"\r\n"{""Q0"":""Response 1"",""Q1"":""Response 2""}","0"\r\n');
|
).toBe('"response","trial_index"\r\n"{""Q0"":""Response 1"",""Q1"":""Response 2""}","0"\r\n');
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -51,7 +53,7 @@ describe("data conversion to csv", () => {
|
|||||||
"trial_type",
|
"trial_type",
|
||||||
"rt_stim1",
|
"rt_stim1",
|
||||||
"response_stim1",
|
"response_stim1",
|
||||||
"version",
|
"plugin_version",
|
||||||
])
|
])
|
||||||
.csv()
|
.csv()
|
||||||
).toBe(
|
).toBe(
|
||||||
@ -81,7 +83,7 @@ describe("data conversion to csv", () => {
|
|||||||
"time_elapsed",
|
"time_elapsed",
|
||||||
"trial_type",
|
"trial_type",
|
||||||
"question_order",
|
"question_order",
|
||||||
"version",
|
"plugin_version",
|
||||||
])
|
])
|
||||||
.csv()
|
.csv()
|
||||||
).toBe('"response","trial_index"\r\n"{""q"":[""fuzz"",""bizz""]}","0"\r\n');
|
).toBe('"response","trial_index"\r\n"{""q"":[""fuzz"",""bizz""]}","0"\r\n');
|
||||||
|
@ -21,7 +21,9 @@ describe("data conversion to json", () => {
|
|||||||
await clickTarget(document.querySelector("#jspsych-survey-text-next"));
|
await clickTarget(document.querySelector("#jspsych-survey-text-next"));
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
getData().ignore(["rt", "internal_node_id", "time_elapsed", "trial_type", "version"]).json()
|
getData()
|
||||||
|
.ignore(["rt", "internal_node_id", "time_elapsed", "trial_type", "plugin_version"])
|
||||||
|
.json()
|
||||||
).toBe(JSON.stringify([{ response: { Q0: "Response 1", Q1: "Response 2" }, trial_index: 0 }]));
|
).toBe(JSON.stringify([{ response: { Q0: "Response 1", Q1: "Response 2" }, trial_index: 0 }]));
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -52,7 +54,7 @@ describe("data conversion to json", () => {
|
|||||||
"trial_type",
|
"trial_type",
|
||||||
"rt_stim1",
|
"rt_stim1",
|
||||||
"response_stim1",
|
"response_stim1",
|
||||||
"version",
|
"plugin_version",
|
||||||
])
|
])
|
||||||
.json()
|
.json()
|
||||||
).toBe(
|
).toBe(
|
||||||
@ -90,7 +92,7 @@ describe("data conversion to json", () => {
|
|||||||
"time_elapsed",
|
"time_elapsed",
|
||||||
"trial_type",
|
"trial_type",
|
||||||
"question_order",
|
"question_order",
|
||||||
"version",
|
"plugin_version",
|
||||||
])
|
])
|
||||||
.json()
|
.json()
|
||||||
).toBe(
|
).toBe(
|
||||||
|
@ -131,7 +131,7 @@ describe("#displayData", () => {
|
|||||||
jsPsych.data.displayData("csv");
|
jsPsych.data.displayData("csv");
|
||||||
// check display element HTML
|
// check display element HTML
|
||||||
expect(getHTML()).toMatch(
|
expect(getHTML()).toMatch(
|
||||||
/<pre id="jspsych-data-display">"rt","stimulus","response","trial_type","trial_index","version","time_elapsed"\r\n"[\d]+","hello","a","html-keyboard-response","0","[\d.]+","[\d]+"\r\n<\/pre>/
|
/<pre id="jspsych-data-display">"rt","stimulus","response","trial_type","trial_index","plugin_version","time_elapsed"\r\n"[\d]+","hello","a","html-keyboard-response","0","[\d.]+","[\d]+"\r\n<\/pre>/
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user