Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrefs committed Mar 6, 2024
1 parent a02bada commit 434eb74
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/lib/experiments/prior-knowledge/dsSampleFromDsName.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,21 @@ describe("dsSampleFromDsName", () => {

const model = createMockModel("this is the result");

const result = await dsSampleFromDsName.runTrials(2, ds, model);
expect(result.length).toEqual(2);
expect(result[0]).toEqual("this is the result");
expect(result[1]).toEqual("this is the result");
const tr = await dsSampleFromDsName.runTrials(2, ds, model);
expect(tr.data.length).toEqual(2);
expect(tr.data[0]).toEqual("this is the result");
expect(tr.data[1]).toEqual("this is the result");
});

test("should return empty string if model.makeRequest returns no data", async () => {
const ds: DatasetProfile = createMockDataset();

const model = createMockModel("");

const result = await dsSampleFromDsName.runTrials(1, ds, model);
const tr = await dsSampleFromDsName.runTrials(1, ds, model);
expect(model.makeRequest).toHaveBeenCalled();
expect(result.length).toEqual(1);
expect(result[0]).toEqual("");
expect(tr.data.length).toEqual(1);
expect(tr.data[0]).toEqual("");
});
});

Expand Down

0 comments on commit 434eb74

Please sign in to comment.