mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
33 lines
781 B
TypeScript
33 lines
781 B
TypeScript
import {
|
|
generateUseOneSubscription,
|
|
genereteUseOneSubscription,
|
|
} from "../../src/utils";
|
|
import type { MetaQuery } from "@refinedev/core";
|
|
|
|
describe("genereteUseOneSubscription (deprecated)", () => {
|
|
const resource = "post";
|
|
const meta: MetaQuery = {
|
|
operation: "post",
|
|
fields: ["id", "title", "createdAt"],
|
|
};
|
|
const id = "1";
|
|
|
|
it("should generate the same result as generateUseOneSubscription", () => {
|
|
const generateUseOneSubscriptionResult = generateUseOneSubscription({
|
|
resource,
|
|
meta,
|
|
id,
|
|
});
|
|
|
|
const genereteUseOneSubscriptionResult = genereteUseOneSubscription({
|
|
resource,
|
|
meta,
|
|
id,
|
|
});
|
|
|
|
expect(genereteUseOneSubscriptionResult).toEqual(
|
|
generateUseOneSubscriptionResult,
|
|
);
|
|
});
|
|
});
|