test: Add integration testing (#131)

* docs: Update description
* deps: Add nock
* chore: Add resolveJsonModule
* test: Add integration testing
* chore: Add @typescript-eslint/eslint-plugin
* refactor: Fix lint errors
* chore: Add eslint-plugin-jest
* refactor: Fix lint errors
* test: Add remove working files
* ci: Comment out cache steps
This commit is contained in:
Shohei Ueda
2020-01-18 10:29:06 +09:00
committed by GitHub
parent 477d977a96
commit 386980e22b
16 changed files with 1249 additions and 96 deletions

View File

@@ -3,7 +3,7 @@ export default function getURL(
extended: string,
version: string
): string {
const extendedStr = (extended: string) => {
const extendedStr = (extended: string): string => {
if (extended === 'true') {
return 'extended_';
} else {
@@ -13,7 +13,7 @@ export default function getURL(
}
};
const ext = (os: string) => {
const ext = (os: string): string => {
if (os === 'Windows') {
return 'zip';
} else {
@@ -21,11 +21,9 @@ export default function getURL(
}
};
const hugoName: string = `hugo_${extendedStr(
extended
)}${version}_${os}-64bit`;
const baseURL: string = 'https://github.com/gohugoio/hugo/releases/download';
const url: string = `${baseURL}/v${version}/${hugoName}.${ext(os)}`;
const hugoName = `hugo_${extendedStr(extended)}${version}_${os}-64bit`;
const baseURL = 'https://github.com/gohugoio/hugo/releases/download';
const url = `${baseURL}/v${version}/${hugoName}.${ext(os)}`;
return url;
}