test(plugin-commands-store): fix

This commit is contained in:
Zoltan Kochan
2022-04-07 19:43:08 +03:00
parent ffb23448fc
commit 5d91e08edd
4 changed files with 13 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ test('pnpm store add express@4.16.3', async () => {
await store.handler({
cacheDir,
dir: process.cwd(),
pnpmHomeDir: '',
rawConfig: {
registry: `http://localhost:${REGISTRY_MOCK_PORT}/`,
},
@@ -37,6 +38,7 @@ test('pnpm store add scoped package that uses not the standard registry', async
await store.handler({
cacheDir,
dir: process.cwd(),
pnpmHomeDir: '',
rawConfig: {
registry: 'https://registry.npmjs.org/',
},
@@ -64,6 +66,7 @@ test('should fail if some packages can not be added', async () => {
await store.handler({
cacheDir,
dir: process.cwd(),
pnpmHomeDir: '',
rawConfig: {
registry: 'https://registry.npmjs.org/',
},

View File

@@ -12,6 +12,7 @@ test('CLI prints the current store path', async () => {
const candidateStorePath = await store.handler({
cacheDir: path.resolve('cache'),
dir: process.cwd(),
pnpmHomeDir: '',
rawConfig: {
registry: REGISTRY,
},

View File

@@ -28,6 +28,7 @@ test('remove unreferenced packages', async () => {
await store.handler({
cacheDir,
dir: process.cwd(),
pnpmHomeDir: '',
rawConfig: {
registry: REGISTRY,
},
@@ -50,6 +51,7 @@ test('remove unreferenced packages', async () => {
await store.handler({
cacheDir,
dir: process.cwd(),
pnpmHomeDir: '',
rawConfig: {
registry: REGISTRY,
},
@@ -83,6 +85,7 @@ test.skip('remove packages that are used by project that no longer exist', async
await store.handler({
cacheDir,
dir: process.cwd(),
pnpmHomeDir: '',
rawConfig: {
registry: REGISTRY,
},
@@ -127,6 +130,7 @@ test('keep dependencies used by others', async () => {
await store.handler({
cacheDir,
dir: process.cwd(),
pnpmHomeDir: '',
rawConfig: {
registry: REGISTRY,
},
@@ -150,6 +154,7 @@ test('keep dependency used by package', async () => {
await store.handler({
cacheDir,
dir: process.cwd(),
pnpmHomeDir: '',
rawConfig: {
registry: REGISTRY,
},
@@ -171,6 +176,7 @@ test('prune will skip scanning non-directory in storeDir', async () => {
await store.handler({
cacheDir,
dir: process.cwd(),
pnpmHomeDir: '',
rawConfig: {
registry: REGISTRY,
},
@@ -195,6 +201,7 @@ test('prune does not fail if the store contains an unexpected directory', async
await store.handler({
cacheDir,
dir: process.cwd(),
pnpmHomeDir: '',
rawConfig: {
registry: REGISTRY,
},

View File

@@ -25,6 +25,7 @@ test('CLI fails when store status finds modified packages', async () => {
await store.handler({
cacheDir,
dir: process.cwd(),
pnpmHomeDir: '',
rawConfig: {
registry: REGISTRY,
},
@@ -66,6 +67,7 @@ test('CLI does not fail when store status does not find modified packages', asyn
await store.handler({
cacheDir,
dir: process.cwd(),
pnpmHomeDir: '',
rawConfig: {
registry: REGISTRY,
},