This repository was archived by the owner on Jul 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +22
-13
lines changed
cortex-js/src/infrastructure/commanders/test Expand file tree Collapse file tree 1 file changed +22
-13
lines changed Original file line number Diff line number Diff line change @@ -68,19 +68,28 @@ describe('Helper commands', () => {
6868 timeout ,
6969 ) ;
7070
71- test ( 'Chat with option -m' , async ( ) => {
72- const logMock = stubMethod ( console , 'log' ) ;
73-
74- await CommandTestFactory . run ( commandInstance , [
75- 'chat' ,
76- // '-m',
77- // 'hello',
78- // '>output.txt',
79- ] ) ;
80- expect ( logMock . firstCall ?. args [ 0 ] ) . toBe ( "Inorder to exit, type 'exit()'." ) ;
81- // expect(exitSpy.callCount).toBe(1);
82- // expect(exitSpy.firstCall?.args[0]).toBe(1);
83- } ) ;
71+ test (
72+ 'Chat with option -m' ,
73+ async ( ) => {
74+ const logMock = stubMethod ( console , 'log' ) ;
75+
76+ await CommandTestFactory . run ( commandInstance , [
77+ 'run' ,
78+ 'tinyllama' ,
79+ // '-m',
80+ // 'hello',
81+ // '>output.txt',
82+ ] ) ;
83+ expect (
84+ logMock . firstCall ?. args [ 0 ] === "Inorder to exit, type 'exit()'." ||
85+ logMock . firstCall ?. args [ 0 ] ===
86+ 'Model tinyllama not found. Try pulling model...' ,
87+ ) . toBeTruthy ( ) ;
88+ // expect(exitSpy.callCount).toBe(1);
89+ // expect(exitSpy.firstCall?.args[0]).toBe(1);
90+ } ,
91+ timeout ,
92+ ) ;
8493
8594 test ( 'Show / kill running models' , async ( ) => {
8695 const tableMock = stubMethod ( console , 'table' ) ;
You can’t perform that action at this time.
0 commit comments