mock API request in test

This commit is contained in:
Robert 2020-08-07 17:15:46 +01:00
parent 657540584e
commit d5c453c995
6 changed files with 34 additions and 6 deletions

View file

@ -442,10 +442,10 @@ async function getLanguagesInRepo(): Promise<Language[]> {
let repo = repo_nwo[1];
core.debug(`GitHub repo ${owner} ${repo}`);
const response = await api.getApiClient(true).request("GET /repos/:owner/:repo/languages", ({
const response = await api.getApiClient(true).repos.listLanguages({
owner,
repo
}));
});
core.debug("Languages API response: " + JSON.stringify(response));