Passed
Push — main ( 62b2dd...fb3253 )
by Pieter Epeüs
02:53 queued 44s
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
ccs 6
cts 6
cp 1
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0

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 }) {
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