mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 20:50:34 +00:00
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
18 lines
474 B
TypeScript
18 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!');
|
|
});
|
|
});
|