Passed
Push — master ( 1b32bd...d6fc40 )
by Dmytro
02:35 queued 12s
created

examples/math/hooks.js   A

Complexity

Total Complexity 3
Complexity/F 1

Size

Lines of Code 11
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 7
mnd 0
bc 0
fnc 3
dl 0
loc 11
rs 10
bpm 0
cpm 1
noi 2
c 0
b 0
f 0
1
/* eslint-disable import/no-commonjs */
2
/* eslint-disable import/unambiguous */
3
const path = require('path');
4
5
module.exports = {
6
    filterExamples(values, cases, { fileName, tests: testFiles }) {
0 ignored issues
show
Unused Code introduced by
The parameter tests is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
7
        const examples = cases
8
            .filter(c => c.helpers.includes(values.name));
9
        const testFile = testFiles.find(f => f === path.join('tests', 'helpers', fileName, `${values.name}.test.js`));
0 ignored issues
show
Bug introduced by
The variable testFiles seems to be never declared. If this is a global, consider adding a /** global: testFiles */ 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...
10
11
        return { examples, testFiles: [ testFile ] };
12
    }
13
};
14