summaryrefslogtreecommitdiff
path: root/packages/core/src/code_assist/server.test.ts
diff options
context:
space:
mode:
authorTommaso Sciortino <[email protected]>2025-06-30 08:47:01 -0700
committerGitHub <[email protected]>2025-06-30 15:47:01 +0000
commit5c4c833ddde197e19ec192896710f6b4c8e178d7 (patch)
treee43de7c25cda3d611cb347beb4fc618875122764 /packages/core/src/code_assist/server.test.ts
parentf3849627fccd610d3701575a7cf711ea0ef7b065 (diff)
Fix oauth credential caching. (#2709)
Diffstat (limited to 'packages/core/src/code_assist/server.test.ts')
-rw-r--r--packages/core/src/code_assist/server.test.ts24
1 files changed, 12 insertions, 12 deletions
diff --git a/packages/core/src/code_assist/server.test.ts b/packages/core/src/code_assist/server.test.ts
index d8d9c10a..9bcfa304 100644
--- a/packages/core/src/code_assist/server.test.ts
+++ b/packages/core/src/code_assist/server.test.ts
@@ -18,8 +18,8 @@ describe('CodeAssistServer', () => {
});
it('should call the generateContent endpoint', async () => {
- const auth = new OAuth2Client();
- const server = new CodeAssistServer(auth, 'test-project');
+ const client = new OAuth2Client();
+ const server = new CodeAssistServer(client, 'test-project');
const mockResponse = {
response: {
candidates: [
@@ -53,8 +53,8 @@ describe('CodeAssistServer', () => {
});
it('should call the generateContentStream endpoint', async () => {
- const auth = new OAuth2Client();
- const server = new CodeAssistServer(auth, 'test-project');
+ const client = new OAuth2Client();
+ const server = new CodeAssistServer(client, 'test-project');
const mockResponse = (async function* () {
yield {
response: {
@@ -90,8 +90,8 @@ describe('CodeAssistServer', () => {
});
it('should call the onboardUser endpoint', async () => {
- const auth = new OAuth2Client();
- const server = new CodeAssistServer(auth, 'test-project');
+ const client = new OAuth2Client();
+ const server = new CodeAssistServer(client, 'test-project');
const mockResponse = {
name: 'operations/123',
done: true,
@@ -112,8 +112,8 @@ describe('CodeAssistServer', () => {
});
it('should call the loadCodeAssist endpoint', async () => {
- const auth = new OAuth2Client();
- const server = new CodeAssistServer(auth, 'test-project');
+ const client = new OAuth2Client();
+ const server = new CodeAssistServer(client, 'test-project');
const mockResponse = {
// TODO: Add mock response
};
@@ -131,8 +131,8 @@ describe('CodeAssistServer', () => {
});
it('should return 0 for countTokens', async () => {
- const auth = new OAuth2Client();
- const server = new CodeAssistServer(auth, 'test-project');
+ const client = new OAuth2Client();
+ const server = new CodeAssistServer(client, 'test-project');
const mockResponse = {
totalTokens: 100,
};
@@ -146,8 +146,8 @@ describe('CodeAssistServer', () => {
});
it('should throw an error for embedContent', async () => {
- const auth = new OAuth2Client();
- const server = new CodeAssistServer(auth, 'test-project');
+ const client = new OAuth2Client();
+ const server = new CodeAssistServer(client, 'test-project');
await expect(
server.embedContent({
model: 'test-model',