|
1 | 1 | import { Command } from 'commander'; |
2 | | -import { parseEnvironmentVariables, parseDomains, parseDomainsFile, escapeShellArg, joinShellArgs, parseVolumeMounts, isValidIPv4, isValidIPv6, parseDnsServers, validateAgentImage, isAgentImagePreset, AGENT_IMAGE_PRESETS, processAgentImageOption, processLocalhostKeyword, validateSkipPullWithBuildLocal, validateAllowHostPorts, validateFormat, validateApiProxyConfig, buildRateLimitConfig, validateRateLimitFlags, formatItem } from './cli'; |
| 2 | +import { parseEnvironmentVariables, parseDomains, parseDomainsFile, escapeShellArg, joinShellArgs, parseVolumeMounts, isValidIPv4, isValidIPv6, parseDnsServers, validateAgentImage, isAgentImagePreset, AGENT_IMAGE_PRESETS, processAgentImageOption, processLocalhostKeyword, validateSkipPullWithBuildLocal, validateAllowHostPorts, validateFormat, validateApiProxyConfig, buildRateLimitConfig, validateRateLimitFlags, formatItem, program } from './cli'; |
3 | 3 | import { redactSecrets } from './redact-secrets'; |
4 | 4 | import * as fs from 'fs'; |
5 | 5 | import * as path from 'path'; |
@@ -1558,4 +1558,36 @@ describe('cli', () => { |
1558 | 1558 | expect(result).toBe(' --flag'); |
1559 | 1559 | }); |
1560 | 1560 | }); |
| 1561 | + |
| 1562 | + describe('help text formatting', () => { |
| 1563 | + it('should include section headers in help output', () => { |
| 1564 | + const help = program.helpInformation(); |
| 1565 | + expect(help).toContain('Domain Filtering:'); |
| 1566 | + expect(help).toContain('Image Management:'); |
| 1567 | + expect(help).toContain('Container Configuration:'); |
| 1568 | + expect(help).toContain('Network & Security:'); |
| 1569 | + expect(help).toContain('API Proxy:'); |
| 1570 | + expect(help).toContain('Logging & Debug:'); |
| 1571 | + }); |
| 1572 | + |
| 1573 | + it('should include usage line', () => { |
| 1574 | + const help = program.helpInformation(); |
| 1575 | + expect(help).toContain('Usage: awf'); |
| 1576 | + }); |
| 1577 | + |
| 1578 | + it('should include program description', () => { |
| 1579 | + const help = program.helpInformation(); |
| 1580 | + expect(help).toContain('Network firewall for agentic workflows'); |
| 1581 | + }); |
| 1582 | + |
| 1583 | + it('should include arguments section', () => { |
| 1584 | + const help = program.helpInformation(); |
| 1585 | + expect(help).toContain('Arguments:'); |
| 1586 | + }); |
| 1587 | + |
| 1588 | + it('should include options section', () => { |
| 1589 | + const help = program.helpInformation(); |
| 1590 | + expect(help).toContain('Options:'); |
| 1591 | + }); |
| 1592 | + }); |
1561 | 1593 | }); |
0 commit comments