File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { getUser } from './actions'
3
3
import { konsola } from '../../utils'
4
4
import { session } from '../../session'
5
5
import chalk from 'chalk'
6
+ import { title } from 'node:process'
6
7
7
8
vi . mock ( './actions' , ( ) => ( {
8
9
getUser : vi . fn ( ) ,
@@ -40,6 +41,7 @@ vi.mock('../../utils', async () => {
40
41
...actualUtils ,
41
42
konsola : {
42
43
ok : vi . fn ( ) ,
44
+ title : vi . fn ( ) ,
43
45
error : vi . fn ( ) ,
44
46
} ,
45
47
handleError : ( error : Error , header = false ) => {
@@ -82,8 +84,7 @@ describe('userCommand', () => {
82
84
}
83
85
await userCommand . parseAsync ( [ 'node' , 'test' ] )
84
86
85
- expect ( konsola . error ) . toHaveBeenCalledWith ( new Error ( `You are not logged in. Please login first.
86
- ` ) )
87
+ expect ( konsola . error ) . toHaveBeenCalledWith ( new Error ( `You are currently not logged in. Please login first to get your user info.` ) , false )
87
88
} )
88
89
89
90
it ( 'should show an error if the user information cannot be fetched' , async ( ) => {
You can’t perform that action at this time.
0 commit comments