mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-09 21:07:46 +00:00
In https://github.com/vercel/vercel/pull/8735 some output was sent to `stderr`, this sends them `stdout` instead.
25 lines
799 B
TypeScript
25 lines
799 B
TypeScript
import { client } from '../../mocks/client';
|
|
import alias from '../../../src/commands/alias';
|
|
import { useUser } from '../../mocks/user';
|
|
import { useAlias } from '../../mocks/alias';
|
|
|
|
describe('alias', () => {
|
|
it('should list up to 20 aliases by default', async () => {
|
|
useUser();
|
|
useAlias();
|
|
client.setArgv('alias', 'ls');
|
|
const exitCodePromise = alias(client);
|
|
await expect(exitCodePromise).resolves.toEqual(0);
|
|
await expect(client.stdout).toOutput('dummy-19.app');
|
|
});
|
|
|
|
it('should list up to 2 aliases', async () => {
|
|
useUser();
|
|
useAlias();
|
|
client.setArgv('alias', 'ls', '--limit', '2');
|
|
const exitCodePromise = alias(client);
|
|
await expect(exitCodePromise).resolves.toEqual(0);
|
|
await expect(client.stdout).toOutput('dummy-1.app');
|
|
});
|
|
});
|