mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-10-16 14:57:05 +08:00
11 lines
486 B
TypeScript
11 lines
486 B
TypeScript
import { describe, expect, test } from 'bun:test';
|
|
import { hasModelAliasConflict } from '../src/components/modelAlias/aliasValidation';
|
|
|
|
describe('model alias validation', () => {
|
|
test('checks aliases case-insensitively while excluding the renamed node', () => {
|
|
expect(hasModelAliasConflict(['Foo'], ' foo ')).toBe(true);
|
|
expect(hasModelAliasConflict(['Foo'], 'foo', 'Foo')).toBe(false);
|
|
expect(hasModelAliasConflict(['Foo', 'Bar'], 'FOO', 'Bar')).toBe(true);
|
|
});
|
|
});
|