mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
Merge remote-tracking branch 'origin/v8' into v8
This commit is contained in:
commit
3b38855ec2
@ -462,6 +462,21 @@ describe("Trial", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("allows null values for parameters with a non-null default value", async () => {
|
||||
TestPlugin.setParameterInfos({
|
||||
allowedNullString: { type: ParameterType.STRING, default: "foo" },
|
||||
});
|
||||
|
||||
const trial = createTrial({ type: TestPlugin, allowedNullString: null });
|
||||
await trial.run();
|
||||
|
||||
expect(trial.pluginInstance.trial).toHaveBeenCalledWith(
|
||||
expect.anything(),
|
||||
expect.objectContaining({ allowedNullString: null }),
|
||||
expect.anything()
|
||||
);
|
||||
});
|
||||
|
||||
describe("with missing required parameters", () => {
|
||||
it("errors on missing simple parameters", async () => {
|
||||
TestPlugin.setParameterInfos({ requiredString: { type: ParameterType.STRING } });
|
||||
|
Loading…
Reference in New Issue
Block a user