@@ -23,30 +23,34 @@ describe('llm', () => {
2323 } ) ;
2424 } ) ;
2525
26- it (
27- 'should be able to generate text' ,
28- {
29- timeout : 5_000 ,
30- } ,
31- async ( ) => {
32- console . log ( 'Starting test' ) ;
33- const prompt = 'Count to 6. Do not use any words.' ;
34- const result = await kernel . launchSubcluster ( {
35- bootstrap : 'user' ,
36- vats : {
37- user : {
38- bundleSpec : getBundleSpec ( 'user' ) ,
39- parameters : { name : 'Alice' , prompt } ,
26+ // Only run in development mode
27+ // eslint-disable-next-line n/no-process-env
28+ describe . runIf ( process . env . NODE_ENV === 'development' ) ( 'integration' , ( ) => {
29+ it (
30+ 'should be able to generate text' ,
31+ {
32+ timeout : 5_000 ,
33+ } ,
34+ async ( ) => {
35+ console . log ( 'Starting test' ) ;
36+ const prompt = 'Count to 6. Do not use any words.' ;
37+ const result = await kernel . launchSubcluster ( {
38+ bootstrap : 'user' ,
39+ vats : {
40+ user : {
41+ bundleSpec : getBundleSpec ( 'user' ) ,
42+ parameters : { name : 'Alice' , prompt } ,
43+ } ,
44+ ollama : {
45+ bundleSpec : getBundleSpec ( 'ollama' ) ,
46+ } ,
4047 } ,
41- ollama : {
42- bundleSpec : getBundleSpec ( 'ollama' ) ,
43- } ,
44- } ,
45- } ) ;
46- expect ( result ) . toBeDefined ( ) ;
47- const llmResponse = kunser ( result as Parameters < typeof kunser > [ 0 ] ) ;
48- expect ( typeof llmResponse ) . toBe ( 'string' ) ;
49- expect ( llmResponse ) . toMatch ( / 1 [ ^ 0 - 9 ] * 2 [ ^ 0 - 9 ] * 3 [ ^ 0 - 9 ] * 4 [ ^ 0 - 9 ] * 5 / u) ;
50- } ,
51- ) ;
48+ } ) ;
49+ expect ( result ) . toBeDefined ( ) ;
50+ const llmResponse = kunser ( result as Parameters < typeof kunser > [ 0 ] ) ;
51+ expect ( typeof llmResponse ) . toBe ( 'string' ) ;
52+ expect ( llmResponse ) . toMatch ( / 1 [ ^ 0 - 9 ] * 2 [ ^ 0 - 9 ] * 3 [ ^ 0 - 9 ] * 4 [ ^ 0 - 9 ] * 5 / u) ;
53+ } ,
54+ ) ;
55+ } ) ;
5256} ) ;
0 commit comments