Passed
Pull Request — master (#111)
by Nicolas
01:41
created

client/src/components/Loader.spec.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 15
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 9
mnd 0
bc 0
fnc 2
dl 0
loc 15
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
1
import '@testing-library/jest-dom/extend-expect';
2
import {screen, render} from '@testing-library/svelte';
3
import Loader from './Loader.svelte';
4
5
it('renders nothing when not loading footer', () => {
6
  render(Loader, {loading: false});
7
8
  expect(screen.queryByRole('status')).not.toBeInTheDocument();
9
});
10
11
it('renders loader on loading', () => {
12
  render(Loader, {loading: true});
13
14
  expect(screen.getByRole('status')).toBeInTheDocument();
15
});
16