Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 04:45 UTC
| 1 | import { expect, test } from 'vitest'; |
| 2 | |
| 3 | import { constDeclaration } from './ConstDeclaration'; |
| 4 | import { docComment } from './DocComment'; |
| 5 | import { namedType } from './NamedType'; |
| 6 | import { stringify } from './stringify'; |
| 7 | |
| 8 | const A = namedType('A'); |
| 9 | |
| 10 | test('basic', () => { |
| 11 | expect(stringify(constDeclaration('B', A))).toMatchInlineSnapshot(`"const B: A"`); |
| 12 | }); |
| 13 | |
| 14 | test('with doc comment', () => { |
| 15 | const decl = constDeclaration('B', A).setDocComment(docComment('Some important value')); |
| 16 | expect(stringify(decl)).toMatchInlineSnapshot(` |
| 17 | "/** |
| 18 | * Some important value |
| 19 | */ |
| 20 | const B: A" |
| 21 | `); |
| 22 | }); |