0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00
verdaccio/e2e/cli/e2e-yarn2/audit.spec.ts
dependabot[bot] 272b35e534
chore(deps): bump actions/upload-artifact from 3.1.1 to 3.1.2 (#3561)
* chore(deps): bump actions/upload-artifact from 3.1.1 to 3.1.2

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](83fd05a356...0b7f8abb15)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix test

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Juan Picado <juanpicado19@gmail.com>
2023-01-13 20:38:39 +01:00

38 lines
1 KiB
TypeScript

import { initialSetup, yarnModernUtils } from '@verdaccio/test-cli-commons';
import { getYarnCommand, yarn } from './utils';
describe('audit a package yarn 2', () => {
jest.setTimeout(10000);
let registry;
let projectFolder;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
const { tempFolder } = await yarnModernUtils.prepareYarnModernProject(
'yarn-2',
registry.getRegistryUrl(),
getYarnCommand(),
{
packageName: '@scope/name',
version: '1.0.0',
dependencies: { jquery: '3.0.0' },
devDependencies: {},
}
);
projectFolder = tempFolder;
});
test('should run yarn npm audit info json body', async () => {
await yarn(projectFolder, 'install');
const resp = await yarn(projectFolder, 'npm', 'audit', '--json');
const parsedBody = JSON.parse(resp.stdout as string);
expect(parsedBody.advisories).toBeDefined();
});
afterAll(async () => {
registry.stop();
});
});