Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

next
ts 25 lines 918 Bytes
Raw
1 import { describe, expect, it } from '@effect/vitest';
2 import { isRemoteCustomToolkitSlug, isRemoteCustomToolSlug } from 'src/utils/remote-custom-toolkit';
3
4 describe('isRemoteCustomToolkitSlug', () => {
5 it.each(['custom_grain', 'CUSTOM_GRAIN', 'custom_x_y'])('matches %s', slug => {
6 expect(isRemoteCustomToolkitSlug(slug)).toBe(true);
7 });
8
9 it.each(['custom', 'custom_', 'customerio', 'customerio_mcp', 'customgpt', 'customjs', 'gmail'])(
10 'does not match %s',
11 slug => {
12 expect(isRemoteCustomToolkitSlug(slug)).toBe(false);
13 }
14 );
15 });
16
17 describe('isRemoteCustomToolSlug', () => {
18 it('matches tools of a remote custom toolkit', () => {
19 expect(isRemoteCustomToolSlug('CUSTOM_GRAIN_SEARCH_PERSONS')).toBe(true);
20 });
21
22 it('does not match tools of native toolkits whose slug starts with "custom"', () => {
23 expect(isRemoteCustomToolSlug('CUSTOMERIO_SEND_EVENT')).toBe(false);
24 });
25 });