Skip to content

Commit 025ea93

Browse files
fix(fetch): added logs and cleanup
1 parent 3d20b2e commit 025ea93

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/operators/src/fetch/download.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { afterEach, test, describe, beforeEach, expect } from 'vitest';
44

55
import { log } from '../log.js';
66
import { download, downloadJSON } from './download.js';
7+
import { resolveJSON } from './resolve.js';
78

89
describe('download operator', function () {
910
beforeEach(function () {
@@ -28,7 +29,7 @@ describe('download operator', function () {
2829
test('successfull download', () =>
2930
new Promise(done => {
3031
of('https://httpbin.org/my-url-fast')
31-
.pipe(downloadJSON(), log(false))
32+
.pipe(download(), log(false), resolveJSON(), log(false))
3233
.subscribe({
3334
next: data => {
3435
expect(data).deep.equal({ hello: 'fast world' });
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { concatMap } from 'rxjs';
22

3+
import { log } from '../log';
34
import { networkRetry } from './retry';
45

56
export const request = () => {
67
return source =>
78
source.pipe(
89
concatMap(req => fetch(req)),
10+
log(false),
911
networkRetry()
1012
);
1113
};

0 commit comments

Comments
 (0)