mirror of https://github.com/msgbyte/tailchat
test: add ErrorView testcase
parent
819adc860d
commit
98632cd530
@ -0,0 +1,10 @@
|
||||
import { render } from '@testing-library/react';
|
||||
import React from 'react';
|
||||
import { ErrorView } from '../ErrorView';
|
||||
|
||||
describe('ErrorView', () => {
|
||||
test('render', () => {
|
||||
const wrapper = render(<ErrorView error={new Error('Dummy Error')} />);
|
||||
expect(wrapper.container).toMatchSnapshot();
|
||||
});
|
||||
});
|
@ -0,0 +1,17 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`ErrorView render 1`] = `
|
||||
<div>
|
||||
<div
|
||||
class="text-center w-full"
|
||||
>
|
||||
<img
|
||||
class="w-32 h-32 m-auto mb-2"
|
||||
src="problem.svg"
|
||||
/>
|
||||
<div>
|
||||
Dummy Error
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
Loading…
Reference in New Issue