11import { vi , describe , it , expect , beforeEach } from "vitest" ;
2- import { makeBaseSystemPrompt , RESPONSE_FORMAT } from "@vibes.diy/prompts" ;
2+ import { makeBaseSystemPrompt } from "@vibes.diy/prompts" ;
33
44// We need to mock the module properly, not test the real implementation yet
55vi . mock ( "@vibes.diy/prompts" , async ( ) => {
@@ -11,12 +11,6 @@ vi.mock("@vibes.diy/prompts", async () => {
1111 demoData : true ,
1212 model : "test-model" ,
1313 } ) ,
14- RESPONSE_FORMAT : {
15- dependencies : {
16- format : '{dependencies: { "package-name": "version" }}' ,
17- note : "use-fireproof is already provided, do not include it" ,
18- } ,
19- } ,
2014 } ;
2115} ) ;
2216
@@ -49,19 +43,6 @@ describe("Prompts Utility", () => {
4943 expect ( result . systemPrompt ) . toBe ( "mocked system prompt" ) ;
5044 } ) ;
5145
52- it ( "defines the correct response format" , ( ) => {
53- // Check that RESPONSE_FORMAT has the expected structure
54- expect ( RESPONSE_FORMAT ) . toHaveProperty ( "structure" ) ;
55-
56- // Check that structure is an array
57- expect ( Array . isArray ( RESPONSE_FORMAT . structure ) ) . toBe ( true ) ;
58- expect ( RESPONSE_FORMAT . structure . length ) . toBeGreaterThan ( 0 ) ;
59- expect ( RESPONSE_FORMAT . structure ) . toContain ( "Brief explanation" ) ;
60- expect ( RESPONSE_FORMAT . structure ) . toContain (
61- "Component code with proper Fireproof integration" ,
62- ) ;
63- } ) ;
64-
6546 it ( "handles fetch errors gracefully" , async ( ) => {
6647 // Mock implementation to throw an error
6748 const mockImplementation = vi . fn ( ) . mockImplementation ( ( ) => {
0 commit comments