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