Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 21 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import {render, RenderResult} from '@testing-library/react'; |
||
2 | import React from 'react'; |
||
3 | import Page from './Page'; |
||
4 | import Model from './Page/Model'; |
||
5 | |||
6 | class TestModule extends React.Component<any, any> { |
||
7 | render(): React.ReactElement { |
||
8 | return <div>Test module</div>; |
||
9 | } |
||
10 | } |
||
11 | |||
12 | describe('Application.View.Page', () => { |
||
13 | it('Shows a module', () => { |
||
14 | const model = new Model(); |
||
15 | model.module = TestModule; |
||
16 | |||
17 | const instance: RenderResult = render(<Page model={model} />); |
||
18 | |||
19 | expect(instance.container.textContent).toBe('Test module'); |
||
20 | }); |
||
21 | }); |