Skip to content

Commit

Permalink
Test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
okaycj committed May 7, 2024
1 parent 32ccd33 commit a6721ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/lookit-initjspsych/src/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ delete global.window.location;
global.window = Object.create(window);
global.window.location = { replace: jest.fn() };

test("jsPsych's on_data_update", async () => {
const jsonData = { data: { attributes: { exp_data: [] } } };
test("jsPsych's on_data_update with some exp_data", async () => {
const jsonData = { data: { attributes: { exp_data: ["some data"] } } };
const response = {
/**
* Mocked json function used in API calls.
Expand All @@ -30,7 +30,7 @@ test("jsPsych's on_data_update", async () => {
expect(Request).toHaveBeenCalledTimes(2);
});

test("jsPsych's on_data_update", async () => {
test("jsPsych's on_data_update with no exp_data", async () => {
const jsonData = { data: { attributes: { exp_data: undefined } } };
const response = {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/surveys/src/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jest.mock("@lookit/data", () => ({
updateResponse: jest.fn().mockReturnValue("Response"),
}));

test("", () => {
test("Markdown to HTML through survey function", () => {
const addMock = jest.fn();
const survey = { onTextMarkdown: { add: addMock } } as unknown as Model;
const textValue = "some text";
Expand Down

0 comments on commit a6721ba

Please sign in to comment.