0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-06 22:40:26 -05:00
verdaccio/packages/tools/helpers/tests/utils.spec.ts
Juan Picado 5cbee6f57f
fix: unpublish a package on storage package (#4937)
* fix: unpublish a package on storage package

fix: unpublish a package on storage package

fix unpublish e2e

* Update index.ts

* reuse cli e2e tests

* npm 10 migrated

* migrate tests

* migrate tests

* clean up

* Create hot-crews-live.md
2024-11-16 20:39:47 +01:00

19 lines
550 B
TypeScript

import { describe, expect, it } from 'vitest';
import { getTarball } from '../src/utils';
describe('getTarball', () => {
it('should return the name when there is no "/" in the input string', () => {
const input = 'simple-name';
const result = getTarball(input);
expect(result).toBe('simple-name');
});
it('should return the second part of the name when there is a "/" in the input string', () => {
const input = 'scope/package-name';
const result = getTarball(input);
expect(result).toBe('package-name');
});
});