{"size": 732, "ext": "js", "max_stars_repo_path": "src/tests/components/ExpensesSummary.test.js", "max_stars_repo_name": "silverqx/expensify", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/tests/components/ExpensesSummary.test.js", "max_issues_repo_name": "silverqx/expensify", "max_issues_repo_issues_event_min_datetime": "2020-09-04T20:14:39.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T10:32:50.000Z", "max_forks_repo_path": "src/tests/components/ExpensesSummary.test.js", "max_forks_repo_name": "silverqx/expensify", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 8, "max_forks_count": null, "avg_line_length": 27.1111111111, "max_line_length": 77, "alphanum_fraction": 0.5737704918}
import React from 'react'
import { shallow } from 'enzyme'

import { ExpensesSummary } from '../../components/ExpensesSummary'

describe('ExpensesSummary component', () => {
    test('should correctly render ExpensesSummary with 1 expense', () => {
        const wrapper = shallow(
            <ExpensesSummary
                expensesCount={1}
                expensesTotal={50.25}
            />)

        expect(wrapper).toMatchSnapshot()
    })

    test('should correctly render ExpensesSummary multiple expenses', () => {
        const wrapper = shallow(
            <ExpensesSummary
                expensesCount={5}
                expensesTotal={244.32}
            />)

        expect(wrapper).toMatchSnapshot()
    })
})
