Passed
Push — main ( 62b2dd...fb3253 )
by Pieter Epeüs
02:53 queued 44s
created

TestFetcher.get   A

Complexity

Conditions 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
crap 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