summaryrefslogtreecommitdiff
path: root/packages/core/src/code_assist/server.test.ts
diff options
context:
space:
mode:
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',