Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

fix(v2): devin tests

Gergő Móricz53f2f7ffdce0
diff --git a/apps/api/src/__tests__/snips/v2-system-prompt-rejection.test.ts b/apps/api/src/__tests__/snips/v2-system-prompt-rejection.test.ts
index ab4329336..b4ea6c9d4 100644
--- a/apps/api/src/__tests__/snips/v2-system-prompt-rejection.test.ts
+++ b/apps/api/src/__tests__/snips/v2-system-prompt-rejection.test.ts
@@ -14,12 +14,12 @@ describe("V2 System Prompt Rejection", () => {
it("should reject systemPrompt in jsonOptions for v2 scrape", async () => {
const response = await scrapeRaw({
url: "https://example.com",
- formats: ["json"],
- jsonOptions: {
+ formats: [{
+ type: "json",
schema: { title: { type: "string" } },
systemPrompt: "Custom system prompt that should be rejected"
- }
- }, identity);
+ }],
+ } as any, identity);
expect(response.statusCode).toBe(400);
expect(response.body.success).toBe(false);
@@ -29,12 +29,12 @@ describe("V2 System Prompt Rejection", () => {
it("should reject systemPrompt in extract options for v2 scrape", async () => {
const response = await scrapeRaw({
url: "https://example.com",
- formats: ["extract"],
- extract: {
+ formats: [{
+ type: "json",
schema: { title: { type: "string" } },
systemPrompt: "Custom system prompt that should be rejected"
- }
- }, identity);
+ }],
+ } as any, identity);
expect(response.statusCode).toBe(400);
expect(response.body.success).toBe(false);
@@ -44,12 +44,12 @@ describe("V2 System Prompt Rejection", () => {
it("should accept valid jsonOptions without systemPrompt", async () => {
const response = await scrapeRaw({
url: "https://example.com",
- formats: ["json"],
- jsonOptions: {
+ formats: [{
+ type: "json",
schema: { title: { type: "string" } },
prompt: "Extract the title"
- }
- }, identity);
+ }],
+ } as any, identity);
expect(response.statusCode).toBe(200);
expect(response.body.success).toBe(true);