Passed
Push — develop ( 9011bf...5a7fee )
by Endre
03:38
created

src/Application/View/Page.test.tsx   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 21
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 1
mnd 0
bc 0
fnc 1
bpm 0
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A TestModule.render 0 2 1
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
});