mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-15 15:15:55 +08:00
Nick: e2e tests for no schema extract
This commit is contained in:
parent
eb2e51e50b
commit
990944188e
@ -244,6 +244,23 @@ describe("E2E Tests for Extract API Routes", () => {
|
||||
expect(response.body.data?.education).toBeDefined();
|
||||
}, 60000);
|
||||
|
||||
it.concurrent("should extract information without a schema", async () => {
|
||||
const response = await request(TEST_URL)
|
||||
.post("/v1/extract")
|
||||
.set("Authorization", `Bearer ${process.env.TEST_API_KEY}`)
|
||||
.set("Content-Type", "application/json")
|
||||
.send({
|
||||
urls: ["https://docs.firecrawl.dev"],
|
||||
prompt: "What is the title and description of the page?"
|
||||
});
|
||||
|
||||
console.log(response.body.data);
|
||||
expect(response.statusCode).toBe(200);
|
||||
expect(response.body).toHaveProperty("data");
|
||||
expect(typeof response.body.data).toBe("object");
|
||||
expect(Object.keys(response.body.data).length).toBeGreaterThan(0);
|
||||
}, 60000);
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user