mirror of
https://github.com/Kaelio/ktx.git
synced 2026-07-04 10:52:13 +02:00
feat(cli): formalize dev-friendly result output
This commit is contained in:
parent
42365481ac
commit
b95cb9b334
2 changed files with 22 additions and 5 deletions
|
|
@ -398,10 +398,18 @@ joins: []
|
|||
listIo.io,
|
||||
);
|
||||
expect(code).toBe(0);
|
||||
expect(listIo.stderr()).toBe('');
|
||||
|
||||
const parsed = JSON.parse(listIo.stdout());
|
||||
expect(parsed.kind).toBe('list');
|
||||
expect(parsed.meta).toEqual({ command: 'sl list' });
|
||||
expect(parsed).toMatchObject({
|
||||
kind: 'list',
|
||||
data: {
|
||||
items: expect.any(Array),
|
||||
},
|
||||
meta: {
|
||||
command: 'sl list',
|
||||
},
|
||||
});
|
||||
expect(parsed.data.items).toHaveLength(1);
|
||||
expect(parsed.data.items[0]).toMatchObject({
|
||||
connectionId: 'warehouse',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue