mirror of
https://github.com/n8n-io/n8n.git
synced 2026-11-03 23:00:11 +08:00
20 lines
598 B
TypeScript
20 lines
598 B
TypeScript
import { INodeCredentialsDetailsSchema } from '../src/schemas';
|
|
|
|
describe('INodeCredentialsDetailsSchema', () => {
|
|
it('accepts AI Gateway-managed credential entries', () => {
|
|
const result = INodeCredentialsDetailsSchema.parse({
|
|
id: null,
|
|
name: '',
|
|
__aiGatewayManaged: true,
|
|
});
|
|
|
|
expect(result).toEqual({ id: null, name: '', __aiGatewayManaged: true });
|
|
});
|
|
|
|
it('accepts real credential entries', () => {
|
|
const result = INodeCredentialsDetailsSchema.parse({ id: 'cred-123', name: 'My credential' });
|
|
|
|
expect(result).toEqual({ id: 'cred-123', name: 'My credential' });
|
|
});
|
|
});
|