mirror of
https://github.com/langgenius/dify.git
synced 2026-09-05 00:31:19 +08:00
Import the committed KnowledgeFS snapshot dc4072ee302317145612087ce7440851dc329fd0 under knowledge-fs/ without its Git history, local IDE settings, or build artifacts.
28 lines
1.0 KiB
TypeScript
28 lines
1.0 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { createApiSourceBulkRemovalRequester } from "./source-product-options";
|
|
|
|
describe("API Source product assembly", () => {
|
|
it("fails production startup when durable source removal cannot be assembled", () => {
|
|
expect(() => createApiSourceBulkRemovalRequester({ production: true })).toThrow(
|
|
"Production Source bulk removal requires the durable deletion repository",
|
|
);
|
|
});
|
|
|
|
it("keeps an unconfigured development Source product disabled", () => {
|
|
expect(createApiSourceBulkRemovalRequester({ production: false })).toBeUndefined();
|
|
});
|
|
|
|
it("assembles the production requester when the durable deletion repository exists", () => {
|
|
const requester = createApiSourceBulkRemovalRequester({
|
|
production: true,
|
|
repository: { requestSourceDeletion: async () => ({ created: true }) } as never,
|
|
});
|
|
expect(requester).toMatchObject({
|
|
find: expect.any(Function),
|
|
get: expect.any(Function),
|
|
request: expect.any(Function),
|
|
});
|
|
});
|
|
});
|