mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-27 13:34:15 -07:00
feat(a2a): Introduce /init command for a2a server (#13419)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2025 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { expect, describe, it } from 'vitest';
|
||||
import { performInit } from './init.js';
|
||||
|
||||
describe('performInit', () => {
|
||||
it('returns info if GEMINI.md already exists', () => {
|
||||
const result = performInit(true);
|
||||
|
||||
expect(result.type).toBe('message');
|
||||
if (result.type === 'message') {
|
||||
expect(result.messageType).toBe('info');
|
||||
expect(result.content).toContain('already exists');
|
||||
}
|
||||
});
|
||||
|
||||
it('returns submit_prompt if GEMINI.md does not exist', () => {
|
||||
const result = performInit(false);
|
||||
expect(result.type).toBe('submit_prompt');
|
||||
|
||||
if (result.type === 'submit_prompt') {
|
||||
expect(result.content).toContain('You are an AI agent');
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user