Convert old tests to use "react-testing-library"
This commit is contained in:
@ -1,40 +0,0 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<Column /> renders correctly with minimal props 1`] = `
|
||||
<div
|
||||
className="relative"
|
||||
column-type="filled"
|
||||
role="region"
|
||||
>
|
||||
<div
|
||||
className="space-y-4 bg-white dark:bg-slate-800 sm:shadow-lg dark:sm:shadow-inset overflow-hidden p-4 sm:rounded-xl"
|
||||
>
|
||||
<div
|
||||
className="mb-4 flex flex-row items-center"
|
||||
>
|
||||
<button
|
||||
aria-label="Back"
|
||||
className="mr-2 text-gray-900 dark:text-gray-100"
|
||||
onClick={[Function]}
|
||||
>
|
||||
<svg
|
||||
id={
|
||||
Object {
|
||||
"process": [Function],
|
||||
}
|
||||
}
|
||||
/>
|
||||
<span
|
||||
className="sr-only"
|
||||
>
|
||||
Back
|
||||
</span>
|
||||
</button>
|
||||
<h1
|
||||
className="text-xl text-gray-900 dark:text-gray-100 font-bold tracking-normal font-sans"
|
||||
/>
|
||||
</div>
|
||||
<div />
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@ -1,13 +0,0 @@
|
||||
import React from 'react';
|
||||
|
||||
import { createComponent } from 'soapbox/test_helpers';
|
||||
|
||||
import Column from '../column';
|
||||
|
||||
describe('<Column />', () => {
|
||||
it('renders correctly with minimal props', () => {
|
||||
const component = createComponent(<Column />);
|
||||
const tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
12
app/soapbox/components/ui/column/__tests__/column.test.tsx
Normal file
12
app/soapbox/components/ui/column/__tests__/column.test.tsx
Normal file
@ -0,0 +1,12 @@
|
||||
import React from 'react';
|
||||
|
||||
import { render, screen } from '../../../../jest/test-helpers';
|
||||
import Column from '../column';
|
||||
|
||||
describe('<Column />', () => {
|
||||
it('renders correctly with minimal props', () => {
|
||||
render(<Column />);
|
||||
|
||||
expect(screen.getByRole('button')).toHaveTextContent('Back');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user