-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve GIT URL via 'git remote...' (#87)
- Loading branch information
1 parent
0aafda8
commit e6202ce
Showing
2 changed files
with
12 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ test.serial('github - repo without description and license', async t => { | |
const gotStub = sandbox.stub(github.got, 'get'); | ||
|
||
execaStub | ||
.withArgs('git', ['config', '--get', 'remote.origin.url']) | ||
.withArgs('git', ['remote', 'get-url', '--push', 'origin']) | ||
.returns('[email protected]:sindresorhus/awesome-lint-test.git'); | ||
|
||
gotStub | ||
|
@@ -70,7 +70,7 @@ test.serial('github - missing topic awesome-list', async t => { | |
const gotStub = sandbox.stub(github.got, 'get'); | ||
|
||
execaStub | ||
.withArgs('git', ['config', '--get', 'remote.origin.url']) | ||
.withArgs('git', ['remote', 'get-url', '--push', 'origin']) | ||
.returns('[email protected]:sindresorhus/awesome-lint-test.git'); | ||
|
||
gotStub | ||
|
@@ -99,7 +99,7 @@ test.serial('github - missing topic awesome', async t => { | |
const gotStub = sandbox.stub(github.got, 'get'); | ||
|
||
execaStub | ||
.withArgs('git', ['config', '--get', 'remote.origin.url']) | ||
.withArgs('git', ['remote', 'get-url', '--push', 'origin']) | ||
.returns('[email protected]:sindresorhus/awesome-lint-test.git'); | ||
|
||
gotStub | ||
|
@@ -127,7 +127,7 @@ test.serial('github - remote origin is an GitLab repo', async t => { | |
const execaStub = sandbox.stub(github.execa, 'stdout'); | ||
|
||
execaStub | ||
.withArgs('git', ['config', '--get', 'remote.origin.url']) | ||
.withArgs('git', ['remote', 'get-url', '--push', 'origin']) | ||
.returns('https://gitlab.com/sindresorhus/awesome-lint-test.git'); | ||
|
||
const messages = await lint({config, filename: 'test/fixtures/github/0.md'}); | ||
|
@@ -144,7 +144,7 @@ test.serial('github - invalid token', async t => { | |
const gotStub = sandbox.stub(github.got, 'get'); | ||
|
||
execaStub | ||
.withArgs('git', ['config', '--get', 'remote.origin.url']) | ||
.withArgs('git', ['remote', 'get-url', '--push', 'origin']) | ||
.returns('[email protected]:sindresorhus/awesome-lint-test.git'); | ||
|
||
gotStub | ||
|
@@ -169,7 +169,7 @@ test.serial('github - API rate limit exceeded with token', async t => { | |
process.env.github_token = 'abcd'; | ||
|
||
execaStub | ||
.withArgs('git', ['config', '--get', 'remote.origin.url']) | ||
.withArgs('git', ['remote', 'get-url', '--push', 'origin']) | ||
.returns('[email protected]:sindresorhus/awesome-lint-test.git'); | ||
|
||
gotStub | ||
|
@@ -197,7 +197,7 @@ test.serial('github - API rate limit exceeded without token', async t => { | |
const gotStub = sandbox.stub(github.got, 'get'); | ||
|
||
execaStub | ||
.withArgs('git', ['config', '--get', 'remote.origin.url']) | ||
.withArgs('git', ['remote', 'get-url', '--push', 'origin']) | ||
.returns('[email protected]:sindresorhus/awesome-lint-test.git'); | ||
|
||
gotStub | ||
|
@@ -223,7 +223,7 @@ test.serial('github - API offline', async t => { | |
const gotStub = sandbox.stub(github.got, 'get'); | ||
|
||
execaStub | ||
.withArgs('git', ['config', '--get', 'remote.origin.url']) | ||
.withArgs('git', ['remote', 'get-url', '--push', 'origin']) | ||
.returns('[email protected]:sindresorhus/awesome-lint-test.git'); | ||
|
||
gotStub | ||
|