Skip to content

Commit

Permalink
fix: e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
BioPhoton committed Oct 22, 2024
1 parent 7485fe4 commit 10a7c76
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions projects/nx-verdaccio/src/executors/env-bootstrap/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export async function configureRegistry(
);
}

await promisify(exec)(setRegistry, { windowsHide: true, shell: true });
await promisify(exec)(setRegistry, { windowsHide: true });

/**
* Protocol-Agnostic Configuration: The use of // allows NPM to configure authentication for a registry without tying it to a specific protocol (http: or https:).
Expand All @@ -99,7 +99,7 @@ export async function configureRegistry(
formatInfo(`Set authToken:\n${setAuthToken}`, VERDACCIO_ENV_TOKEN)
);
}
await promisify(exec)(setAuthToken, { windowsHide: true, shell: true });
await promisify(exec)(setAuthToken, { windowsHide: true });
}

export type UnconfigureRegistryOptions = Pick<
Expand Down Expand Up @@ -135,7 +135,7 @@ export async function unconfigureRegistry(
formatInfo(`Delete authToken:\n${setAuthToken}`, VERDACCIO_ENV_TOKEN)
);
}
await promisify(exec)(setAuthToken, { windowsHide: true, shell: true });
await promisify(exec)(setAuthToken, { windowsHide: true });

const setRegistry = `npm config delete registry ${objectToCliArgs({
userconfig,
Expand All @@ -145,5 +145,5 @@ export async function unconfigureRegistry(
formatInfo(`Delete registry:\n${setRegistry}`, VERDACCIO_ENV_TOKEN)
);
}
await promisify(exec)(setRegistry, { windowsHide: true, shell: true });
await promisify(exec)(setRegistry, { windowsHide: true });
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ describe('configureRegistry', () => {
expect(execMock).toHaveBeenCalledTimes(2);
expect(execMock).toHaveBeenCalledWith(
'npm config set registry="http://localhost:4873" --userconfig="test-config"',
{ windowsHide: true, shell: true }
{ windowsHide: true }
);

expect(execMock).toHaveBeenCalledWith(
'npm config set //localhost:4873/:_authToken "secretVerdaccioToken" --userconfig="test-config"',
{ windowsHide: true, shell: true }
{ windowsHide: true }
);
});

Expand Down Expand Up @@ -100,12 +100,12 @@ describe('unconfigureRegistry', () => {
expect(execMock).toHaveBeenCalledTimes(2);
expect(execMock).toHaveBeenCalledWith(
'npm config delete registry --userconfig="test-config"',
{ windowsHide: true, shell: true }
{ windowsHide: true }
);

expect(execMock).toHaveBeenCalledWith(
'npm config delete //localhost:4873/:_authToken --userconfig="test-config"',
{ windowsHide: true, shell: true }
{ windowsHide: true }
);
});

Expand Down

0 comments on commit 10a7c76

Please sign in to comment.