Skip to content

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

833 B
Raw Blame
import { describe, expect, it } from '@effect/vitest';
import cliPackageJson from '../../../package.json' with { type: 'json' };
import {
  buildCliReleaseVersionDefineArgs,
  extractCliReleaseVersion,
} from 'src/utils/cli-release-version';

describe('CLI release version authority', () => {
  it('uses a non-release development sentinel', () => {
    expect(cliPackageJson.version).toBe('0.0.0-development');
  });

  it('derives the exact GitHub release version', () => {
    expect(extractCliReleaseVersion('@composio/[email protected]')).toBe('0.2.33-beta.322');
    expect(extractCliReleaseVersion('@composio/[email protected]')).toBeUndefined();
    expect(buildCliReleaseVersionDefineArgs('@composio/[email protected]')).toEqual([
      '--define',
      '__COMPOSIO_CLI_RELEASE_VERSION__="0.2.33-beta.322"',
    ]);
  });
});