Sha256: 5889bb3ed0ed54485c07908a279b99102a123ef2abfa3d911a547686908e0296
Contents?: true
Size: 745 Bytes
Versions: 546
Compression:
Stored size: 745 Bytes
Contents
import React from 'react'; import { render, screen } from '../utilities/test-utils'; import BarGraph from './_bar_graph'; beforeEach(() => { // Silences error logs within the test suite. jest.spyOn(console, 'error'); jest.spyOn(console, 'warn'); console.error.mockImplementation(() => {}); console.warn.mockImplementation(() => {}); }); afterEach(() => { console.error.mockRestore(); console.warn.mockRestore(); }); const testId = 'bargraph1'; test('bargraph uses exact classname', () => { render( <BarGraph className='super_important_class' data={{ testid: testId }} id='bar-default' /> ); const kit = screen.getByTestId(testId); expect(kit).toHaveClass('super_important_class'); });
Version data entries
546 entries across 546 versions & 1 rubygems