File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -145,13 +145,13 @@ describe('away', () => {
145145 } )
146146
147147 describe ( 'clear' , ( ) => {
148- it ( 'calls users.update with null awayMode' , async ( ) => {
148+ it ( 'calls users.update with empty string awayMode to clear ' , async ( ) => {
149149 const logSpy = vi . spyOn ( console , 'log' ) . mockImplementation ( ( ) => { } )
150150 const program = createProgram ( )
151151
152152 await program . parseAsync ( [ 'node' , 'tw' , 'away' , 'clear' ] )
153153
154- expect ( apiMocks . updateUser ) . toHaveBeenCalledWith ( { awayMode : null } )
154+ expect ( apiMocks . updateUser ) . toHaveBeenCalledWith ( { awayMode : '' } )
155155 expect ( logSpy ) . toHaveBeenCalledWith ( 'Away status cleared.' )
156156 logSpy . mockRestore ( )
157157 } )
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ async function clearAway(options: MutationOptions & ViewOptions): Promise<void>
9292 }
9393
9494 const client = await getTwistClient ( )
95- const user = await client . users . update ( { awayMode : null as never } )
95+ const user = await client . users . update ( { awayMode : '' as never } )
9696
9797 if ( options . json ) {
9898 console . log ( formatJson ( user , 'user' , options . full ) )
You can’t perform that action at this time.
0 commit comments