da064d5e88
- supports isTool and timeout settings in defineLogicFunction in apps and in setting tabs definition - compute for all toolInputSchema for logic funciton, in settings and in code steps <img width="991" height="802" alt="image" src="https://github.com/user-attachments/assets/05dc1221-cac9-45a3-87b0-3b13161446fd" />
26 lines
756 B
TypeScript
26 lines
756 B
TypeScript
import { normalizeGQLQuery } from '~/utils/normalizeGQLQuery';
|
|
|
|
describe('normalizeGQLQuery', () => {
|
|
it('should produce consistent output for the same query', () => {
|
|
const query = 'query { users { id name } }';
|
|
|
|
const resultA = normalizeGQLQuery(query);
|
|
const resultB = normalizeGQLQuery(query);
|
|
|
|
expect(resultA).toBe(resultB);
|
|
});
|
|
|
|
it('should produce the same output regardless of whitespace', () => {
|
|
const queryA = 'query { users { id name } }';
|
|
const queryB = 'query{users{id name}}';
|
|
|
|
expect(normalizeGQLQuery(queryA)).toBe(normalizeGQLQuery(queryB));
|
|
});
|
|
|
|
it('should return a string', () => {
|
|
const result = normalizeGQLQuery('query { users { id } }');
|
|
|
|
expect(typeof result).toBe('string');
|
|
});
|
|
});
|