fix: remove dependency to git-url-parse
This commit is contained in:
@@ -101,6 +101,19 @@ test('Return the "https" formatted URL if "gitCredentials" is defined and reposi
|
||||
);
|
||||
});
|
||||
|
||||
test('Return the "https" formatted URL if "gitCredentials" is defined and repositoryUrl is a "git" URL without user', async t => {
|
||||
const {cwd} = await gitRepo();
|
||||
|
||||
t.is(
|
||||
await getAuthUrl({
|
||||
cwd,
|
||||
env: {...env, GIT_CREDENTIALS: 'user:pass'},
|
||||
options: {branch: 'master', repositoryUrl: 'host.null:owner/repo.git'},
|
||||
}),
|
||||
'https://user:pass@host.null/owner/repo.git'
|
||||
);
|
||||
});
|
||||
|
||||
test('Return the "https" formatted URL if "gitCredentials" is defined and repositoryUrl is a "https" URL', async t => {
|
||||
const {cwd} = await gitRepo();
|
||||
|
||||
|
||||
@@ -1086,6 +1086,7 @@ test('Hide sensitive information passed to "success" plugin', async t => {
|
||||
verifyConditions: false,
|
||||
verifyRelease: false,
|
||||
prepare: false,
|
||||
generateNotes: stub().resolves(`Exposing token ${env.MY_TOKEN}`),
|
||||
publish: stub().resolves({
|
||||
name: `Name: Exposing token ${env.MY_TOKEN}`,
|
||||
url: `URL: Exposing token ${env.MY_TOKEN}`,
|
||||
|
||||
Reference in New Issue
Block a user