Skip to main content
Glama
push-based

Angular Toolkit MCP

by push-based
format-command-log.integration.test.ts1.83 kB
import path from 'node:path'; import { describe, expect, it } from 'vitest'; import { removeColorCodes } from '@push-based/testing-utils'; import { formatCommandLog } from './format-command-log.js'; describe('formatCommandLog', () => { it('should format simple command', () => { const result = removeColorCodes( formatCommandLog('npx', ['command', '--verbose']), ); expect(result).toBe('$ npx command --verbose'); }); it('should format simple command with explicit process.cwd()', () => { const result = removeColorCodes( formatCommandLog('npx', ['command', '--verbose'], process.cwd()), ); expect(result).toBe('$ npx command --verbose'); }); it('should format simple command with relative cwd', () => { const result = removeColorCodes( formatCommandLog('npx', ['command', '--verbose'], './wololo'), ); expect(result).toBe(`wololo $ npx command --verbose`); }); it('should format simple command with absolute non-current path converted to relative', () => { const result = removeColorCodes( formatCommandLog( 'npx', ['command', '--verbose'], path.join(process.cwd(), 'tmp'), ), ); expect(result).toBe('tmp $ npx command --verbose'); }); it('should format simple command with relative cwd in parent folder', () => { const result = removeColorCodes( formatCommandLog('npx', ['command', '--verbose'], '..'), ); expect(result).toBe(`.. $ npx command --verbose`); }); it('should format simple command using relative path to parent directory', () => { const result = removeColorCodes( formatCommandLog( 'npx', ['command', '--verbose'], path.dirname(process.cwd()), ), ); expect(result).toBe('.. $ npx command --verbose'); }); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/push-based/angular-toolkit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server