mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-13 03:35:52 +01:00
33 lines
784 B
TypeScript
33 lines
784 B
TypeScript
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
|
|
|
|
import { addRegistry, initialSetup } from '@verdaccio/test-cli-commons';
|
|
|
|
import { pnpm } from './utils';
|
|
|
|
describe('install a package', () => {
|
|
let registry;
|
|
|
|
beforeAll(async () => {
|
|
const setup = await initialSetup();
|
|
registry = setup.registry;
|
|
await registry.init();
|
|
});
|
|
|
|
test('should run pnpm info json body', async () => {
|
|
const resp = await pnpm(
|
|
{},
|
|
'info',
|
|
'verdaccio',
|
|
'--json',
|
|
...addRegistry(registry.getRegistryUrl())
|
|
);
|
|
const parsedBody = JSON.parse(resp.stdout as string);
|
|
expect(parsedBody.name).toEqual('verdaccio');
|
|
expect(parsedBody.dependencies).toBeDefined();
|
|
});
|
|
|
|
afterAll(async () => {
|
|
registry.stop();
|
|
});
|
|
});
|