{"size": 1001, "ext": "js", "max_stars_repo_path": "frontend/tests/components/stl/STLResultChart.spec.js", "max_stars_repo_name": "dmryutov/otus-python-0319-final", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "frontend/tests/components/stl/STLResultChart.spec.js", "max_issues_repo_name": "dmryutov/otus-python-0319-final", "max_issues_repo_issues_event_min_datetime": "2020-06-05T23:05:14.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-10T10:42:31.000Z", "max_forks_repo_path": "frontend/tests/components/stl/STLResultChart.spec.js", "max_forks_repo_name": "dmryutov/otus-python-0319-final", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 6, "max_forks_count": null, "avg_line_length": 25.6666666667, "max_line_length": 68, "alphanum_fraction": 0.5044955045}
import Vuetify from 'vuetify';
import {createLocalVue, mount} from '@vue/test-utils';

import STLResultChart from '@/components/stl/STLResultChart';


const localVue = createLocalVue();
localVue.use(Vuetify);


describe('components/stl/STLResultChart', () => {
    const data = [112, 118, 132, 129, 121, 135, 148, 148, 136, 119];
    const result = {
        trend: [
            0, 120.0, 127.75, 127.75, 126.5,
            134.75, 144.75, 145, 134.75, 0,
        ],
        seasonal: [
            1.00073, 0.99927, 1.00073, 0.99927, 1.00073,
            0.99927, 1.00073, 0.99927, 1.00073, 0.99927,
        ],
        resid: [
            0, 0.98405, 1.03252, 1.01052, 0.95583,
            1.00259, 1.02171, 1.02143, 1.00854, 0,
        ],
    };

    it('render', () => {
        const wrapper = mount(STLResultChart, {
            localVue,
            propsData: {
                data,
                result,
            },
        });
        expect(wrapper.exists()).toBe(true);
    });
});
