Passed
Push — master ( 9157a5...293fbd )
by Zhenyu
01:50
created

src/__tests__/operation.js   A

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 23
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 0
wmc 4
eloc 13
c 1
b 0
f 1
nc 1
mnd 0
bc 4
fnc 4
dl 0
loc 23
rs 10
bpm 1
cpm 1
noi 3

1 Function

Rating   Name   Duplication   Size   Complexity  
A operation.js ➔ ??? 0 18 1
1
import * as nAutoMetrics from '@financial-times/n-auto-metrics';
2
3
import setupMonitor from '../setup';
4
import monitor from '../operation';
5
6
describe('monitor', () => {
7
	afterEach(() => {
8
		jest.resetAllMocks();
0 ignored issues
show
Bug introduced by
The variable jest seems to be never declared. If this is a global, consider adding a /** global: jest */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
9
	});
10
11
	const app = {
12
		use: jest.fn(),
0 ignored issues
show
Bug introduced by
The variable jest seems to be never declared. If this is a global, consider adding a /** global: jest */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
13
	};
14
	// const metrics = {};
15
	// const logger = {};
16
17
	it.skip('disable autoNext if it was set to false', () => {
0 ignored issues
show
Bug introduced by
The variable it seems to be never declared. If this is a global, consider adding a /** global: it */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
18
		setupMonitor({ app, autoNext: false });
19
		const targetOperation = () => {};
20
		monitor(targetOperation);
21
		expect(nAutoMetrics.compose.mock.calls).toMatchSnapshot();
22
	});
23
});
24