File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
packages/core/src/code_assist Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 7
7
import { describe , it , expect , vi } from 'vitest' ;
8
8
import { CodeAssistServer } from './server.js' ;
9
9
import { OAuth2Client } from 'google-auth-library' ;
10
+ import { UserTierId } from './types.js' ;
10
11
11
12
vi . mock ( 'google-auth-library' ) ;
12
13
@@ -115,7 +116,14 @@ describe('CodeAssistServer', () => {
115
116
const client = new OAuth2Client ( ) ;
116
117
const server = new CodeAssistServer ( client , 'test-project' ) ;
117
118
const mockResponse = {
118
- // TODO: Add mock response
119
+ currentTier : {
120
+ id : UserTierId . FREE ,
121
+ name : 'Free' ,
122
+ description : 'free tier' ,
123
+ } ,
124
+ allowedTiers : [ ] ,
125
+ ineligibleTiers : [ ] ,
126
+ cloudaicompanionProject : 'projects/test' ,
119
127
} ;
120
128
vi . spyOn ( server , 'requestPost' ) . mockResolvedValue ( mockResponse ) ;
121
129
@@ -127,7 +135,7 @@ describe('CodeAssistServer', () => {
127
135
'loadCodeAssist' ,
128
136
expect . any ( Object ) ,
129
137
) ;
130
- expect ( response ) . toBe ( mockResponse ) ;
138
+ expect ( response ) . toEqual ( mockResponse ) ;
131
139
} ) ;
132
140
133
141
it ( 'should return 0 for countTokens' , async ( ) => {
You can’t perform that action at this time.
0 commit comments