UNPKG

@navinc/base-react-components

Version:
15 lines (13 loc) 596 B
import React from 'react' import { render, fireEvent } from '../tests/with-app-context.js' import { singleArticle } from './data/article' import Article from './article' describe('<Article />', () => { it('Article can open and close', () => { const { getByText, queryByText } = render(<Article {...singleArticle} />) fireEvent.click(getByText('SBA Targeted EIDL Advance Grants: Do You Qualify?')) expect(getByText('APR and Interest Rate')).toBeInTheDocument() fireEvent.click(getByText('Close')) expect(queryByText('APR and Interest Rate')).not.toBeInTheDocument() }) })