mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-06 22:40:26 -05:00
5cbee6f57f
* 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
19 lines
550 B
TypeScript
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');
|
|
});
|
|
});
|