mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-26 13:04:49 -07:00
19 lines
474 B
TypeScript
19 lines
474 B
TypeScript
|
|
/**
|
||
|
|
* @license
|
||
|
|
* Copyright 2025 Google LLC
|
||
|
|
* SPDX-License-Identifier: Apache-2.0
|
||
|
|
*/
|
||
|
|
|
||
|
|
import { expect, describe, it } from 'vitest';
|
||
|
|
import { hydrateString } from './variables.js';
|
||
|
|
|
||
|
|
describe('hydrateString', () => {
|
||
|
|
it('should replace a single variable', () => {
|
||
|
|
const context = {
|
||
|
|
extensionPath: 'path/my-extension',
|
||
|
|
};
|
||
|
|
const result = hydrateString('Hello, ${extensionPath}!', context);
|
||
|
|
expect(result).toBe('Hello, path/my-extension!');
|
||
|
|
});
|
||
|
|
});
|