list-add.test.js
1 import { describe, expect, it } from 'vitest'; 2 import { getRegistry } from '@jackwener/opencli/registry'; 3 import './list-add.js'; 4 5 describe('twitter list-add registration', () => { 6 it('registers the list-add command with the expected shape', () => { 7 const cmd = getRegistry().get('twitter/list-add'); 8 expect(cmd?.func).toBeTypeOf('function'); 9 expect(cmd?.columns).toEqual(['listId', 'username', 'userId', 'status', 'message']); 10 const listIdArg = cmd?.args?.find((a) => a.name === 'listId'); 11 expect(listIdArg).toBeTruthy(); 12 expect(listIdArg?.required).toBe(true); 13 expect(listIdArg?.positional).toBe(true); 14 }); 15 });