Passed
Branch feature/first-draft (480f87)
by Pieter Epeüs
03:34
created

src/__fixtures__/test-fetcher.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 16
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 10
mnd 0
bc 0
fnc 2
dl 0
loc 16
bpm 0
cpm 1
noi 2
c 0
b 0
f 0
ccs 6
cts 6
cp 1
rs 10

2 Functions

Rating   Name   Duplication   Size   Complexity  
A TestFetcher.get 0 4 1
A TestFetcher.create 0 7 1
1
import Fetcher from '../fetcher.js'
2
3
export default class TestFetcher extends Fetcher {
4
  async get ({ url, path, searchParams }) {
0 ignored issues
show
Unused Code introduced by
The parameter searchParams 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...
Unused Code introduced by
The parameter path 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...
5 3
    this.log(`Call a request to ${url}`)
6 3
    return 42
7
  }
8
9
  static create ({ fetch, logger }) {
10 4
    const fetcher = new TestFetcher()
11 4
    fetcher.setFetch(fetch)
12 4
    fetcher.setLogger(logger)
13
14 3
    return fetcher
15
  }
16
}
17