push
circleci
502 of 6578 branches covered (0.0%)
Branch coverage included in aggregate %.
1 of 2 new or added lines in 1 file covered. (50.0%)
10248 existing lines in 329 files now uncovered.3092 of 14083 relevant lines covered (21.96%)
92.82 hits per line
1 |
import { fromEvent } from 'rxjs'; |
|
2 |
import { map, take } from 'rxjs/operators'; |
|
3 |
|
1✔ |
UNCOV
4
|
export const fetchImageBlob = (url: string) => { |
× |
UNCOV
5
|
const xhr = new XMLHttpRequest(); |
× |
UNCOV
6
|
xhr.open('GET', url); |
× |
UNCOV
7
|
xhr.responseType = 'blob'; |
× |
UNCOV
8
|
const loadedXhr$ = fromEvent(xhr, 'load').pipe( |
× |
9 |
take(1),
|
|
UNCOV
10
|
map(data => { |
× |
UNCOV
11
|
return xhr.response;
|
× |
12 |
}) |
|
13 |
); |
|
14 |
xhr.send(); |
|
15 |
return loadedXhr$;
|
|
16 |
}; |