mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 01:05:14 +08:00
test: fix unit test failures
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { jest } from "@jest/globals";
|
||||
import { isVisionModel } from "../app/utils";
|
||||
|
||||
describe("isVisionModel", () => {
|
||||
@@ -50,7 +51,7 @@ describe("isVisionModel", () => {
|
||||
|
||||
test("should identify models from VISION_MODELS env var", () => {
|
||||
process.env.VISION_MODELS = "custom-vision-model,another-vision-model";
|
||||
|
||||
|
||||
expect(isVisionModel("custom-vision-model")).toBe(true);
|
||||
expect(isVisionModel("another-vision-model")).toBe(true);
|
||||
expect(isVisionModel("unrelated-model")).toBe(false);
|
||||
@@ -64,4 +65,4 @@ describe("isVisionModel", () => {
|
||||
expect(isVisionModel("unrelated-model")).toBe(false);
|
||||
expect(isVisionModel("gpt-4-vision")).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user