@whook/whook
Version:
Build strong and efficient REST web services.
27 lines (24 loc) • 478 B
text/typescript
import { describe, test, expect } from '@jest/globals';
import { parseArgs } from './args.js';
describe('parseArgs', () => {
test('should parse args', async () => {
const args = await parseArgs([
'whook',
'route',
'--name',
'getPing',
'--parameters',
'{}',
]);
expect(args).toMatchInlineSnapshot(`
{
"command": "route",
"namedArguments": {
"name": "getPing",
"parameters": "{}",
},
"rest": [],
}
`);
});
});