Make getVariantAnalysisRepoResult return the correct type
We expect this method to return a zip file which can be typed to an `ArrayBuffer`. In the following commits we'll read this buffer and save it as a zip file.
This commit is contained in:
@@ -77,12 +77,9 @@ export async function getVariantAnalysisRepo(
|
||||
export async function getVariantAnalysisRepoResult(
|
||||
credentials: Credentials,
|
||||
downloadUrl: string,
|
||||
): Promise<unknown> {
|
||||
): Promise<ArrayBuffer> {
|
||||
const octokit = await credentials.getOctokit();
|
||||
|
||||
const response: OctokitResponse<VariantAnalysisRepoTask> = await octokit.request(
|
||||
`GET ${downloadUrl}`
|
||||
);
|
||||
const response = await octokit.request(`GET ${downloadUrl}`);
|
||||
|
||||
return response.data;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ describe('Variant Analysis Manager', async function() {
|
||||
delete dummyRepoTask.artifact_url;
|
||||
getVariantAnalysisRepoStub = sandbox.stub(ghApiClient, 'getVariantAnalysisRepo').resolves(dummyRepoTask);
|
||||
|
||||
const dummyResult = 'this-is-a-repo-result';
|
||||
const dummyResult = new ArrayBuffer(24);
|
||||
getVariantAnalysisRepoResultStub = sandbox.stub(ghApiClient, 'getVariantAnalysisRepoResult').resolves(dummyResult);
|
||||
});
|
||||
|
||||
@@ -108,7 +108,7 @@ describe('Variant Analysis Manager', async function() {
|
||||
const dummyRepoTask = createMockVariantAnalysisRepoTask();
|
||||
getVariantAnalysisRepoStub = sandbox.stub(ghApiClient, 'getVariantAnalysisRepo').resolves(dummyRepoTask);
|
||||
|
||||
const dummyResult = 'this-is-a-repo-result';
|
||||
const dummyResult = new ArrayBuffer(24);
|
||||
getVariantAnalysisRepoResultStub = sandbox.stub(ghApiClient, 'getVariantAnalysisRepoResult').resolves(dummyResult);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user