File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -100,14 +100,15 @@ export const liveTestConfigs: readonly TestConfig[] = backends.flatMap(
100100 * do not define a model string.
101101 * These tests should only run once per backend, rather than once per backend *per model*.
102102 */
103- export const promptTemplatesTestConfigs : readonly TestConfig [ ] = backends . flatMap ( backend => {
104- const ai = getAI ( app , { backend } ) ;
105- return {
106- ai,
107- model : '' , // Unused by prompt templates tests
108- toString : ( ) => formatConfigAsString ( { ai, model : '' } )
109- } ;
110- } ) ;
103+ export const promptTemplatesTestConfigs : readonly TestConfig [ ] =
104+ backends . flatMap ( backend => {
105+ const ai = getAI ( app , { backend } ) ;
106+ return {
107+ ai,
108+ model : '' , // Unused by prompt templates tests
109+ toString : ( ) => formatConfigAsString ( { ai, model : '' } ) . trim ( )
110+ } ;
111+ } ) ;
111112
112113export const TINY_IMG_BASE64 =
113114 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=' ;
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const templateBackendSuffix = (
3131describe ( 'Prompt templates' , function ( ) {
3232 this . timeout ( 20_000 ) ;
3333 promptTemplatesTestConfigs . forEach ( testConfig => {
34- describe ( `${ promptTemplatesTestConfigs . toString ( ) } ` , ( ) => {
34+ describe ( `${ testConfig . toString ( ) } ` , ( ) => {
3535 describe ( 'Generative Model' , ( ) => {
3636 it ( 'successfully generates content' , async ( ) => {
3737 const model = getTemplateGenerativeModel ( testConfig . ai ) ;
@@ -53,7 +53,7 @@ describe('Prompt templates', function () {
5353 ) } `,
5454 { animal : 'Rhino' }
5555 ) ;
56- expect ( images . length ) . to . equal ( 1 ) ; // We ask for two images in the prompt template
56+ expect ( images . length ) . to . equal ( 1 ) ; // The template is configured to generate one image.
5757 } ) ;
5858 } ) ;
5959 } ) ;
You can’t perform that action at this time.
0 commit comments