mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
21 lines
582 B
TypeScript
21 lines
582 B
TypeScript
import dataProvider from "../../src/index";
|
|
import "./index.mock";
|
|
|
|
describe("getMany", () => {
|
|
it("correct response", async () => {
|
|
const response = await dataProvider(
|
|
"keywoytODSr6xAqfg",
|
|
"appKYl1H4k9g73sBT",
|
|
).getMany!({
|
|
resource: "posts",
|
|
ids: ["recLKRioqifTrPUIz", "rec9GbXLzd6dxn4Il"],
|
|
});
|
|
|
|
const { data } = response;
|
|
|
|
expect(data[0]["id"]).toBe("rec9GbXLzd6dxn4Il");
|
|
expect(data[1]["id"]).toBe("recLKRioqifTrPUIz");
|
|
expect(response.data.length).toBe(2);
|
|
});
|
|
});
|