Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from amacado/feature/12-enhance-configuration
- Loading branch information
Showing
9 changed files
with
110 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"editor.formatOnSave": true | ||
} | ||
"editor.formatOnSave": true, | ||
"createTests.defaultLocationForTestFiles": "project root", | ||
"createTests.testDirectoryName": "__tests__" | ||
} |
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
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
feature: ['feature/*', 'feat/*'] | ||
'🎉 feature': ['feature/*', 'feat/*'] | ||
fix: fix/* | ||
chore: chore/* | ||
release: release/* |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import getConfig from '../../src/utils/config' | ||
|
||
describe('getConfig', () => { | ||
it('returns default config when GitHub returns a 404 for given path', async () => { | ||
const defaultConfig = { | ||
foo: 'bar' | ||
} | ||
|
||
const githubMock = { | ||
repos: { | ||
getContents() { | ||
throw new HTTPError(404) | ||
} | ||
} | ||
} | ||
|
||
const config = await getConfig( | ||
githubMock as any, | ||
'path/to/config', | ||
{ owner: 'repo-owner', repo: 'repo-name' }, | ||
'ref', | ||
defaultConfig | ||
) | ||
|
||
expect(config).toBe(defaultConfig) | ||
}) | ||
}) | ||
|
||
class HTTPError { | ||
constructor(public status: number) {} | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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