{"size": 686, "ext": "js", "max_stars_repo_path": "htmlui/src/tests/api_mocks.js", "max_stars_repo_name": "moben/kopia", "max_stars_repo_stars_event_min_datetime": "2016-08-18T18:24:30.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T23:04:17.000Z", "max_issues_repo_path": "htmlui/src/tests/api_mocks.js", "max_issues_repo_name": "moben/kopia", "max_issues_repo_issues_event_min_datetime": "2016-07-11T12:15:16.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T08:21:29.000Z", "max_forks_repo_path": "htmlui/src/tests/api_mocks.js", "max_forks_repo_name": "moben/kopia", "max_forks_repo_forks_event_min_datetime": "2016-11-30T14:29:30.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-26T15:42:13.000Z"}
{"max_stars_count": 1592, "max_issues_count": 1315, "max_forks_count": 126, "avg_line_length": 24.5, "max_line_length": 59, "alphanum_fraction": 0.5685131195}
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';

export function setupAPIMock() {
    let axiosMock = new MockAdapter(axios);
    axiosMock.reset();

    axiosMock.onGet("/api/v1/repo/algorithms").reply(200, {
        defaultEncryption: "e-bar",
        encryption: ["e-foo", "e-bar", "e-baz"],

        defaultSplitter: "s-bar",
        splitter: ["s-foo", "s-bar", "s-baz"],

        defaultHash: "h-bar",
        hash: ["h-foo", "h-bar", "h-baz"],

        compression: ["c-foo", "c-bar", "c-baz"],
    });

    axiosMock.onGet("/api/v1/current-user").reply(200, {
        username: "someuser",
        hostname: "somehost",
    });

    return axiosMock;
}
