Skip to content

Commit 522f2ca

Browse files
fix(fetch): cleanup
1 parent c56babb commit 522f2ca

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('download operator', function () {
2626
fetchMock.restore();
2727
});
2828

29-
test('successfull download', () =>
29+
test('successfull download - indirect json resolve', () =>
3030
new Promise(done => {
3131
of('https://httpbin.org/my-url-fast')
3232
.pipe(download(), log(false), resolveJSON(), log(false))
@@ -37,4 +37,16 @@ describe('download operator', function () {
3737
complete: e => done()
3838
});
3939
}));
40+
41+
test('successfull download - direct json resolve', () =>
42+
new Promise(done => {
43+
of('https://httpbin.org/my-url-fast')
44+
.pipe(downloadJSON(), log(false))
45+
.subscribe({
46+
next: data => {
47+
expect(data).deep.equal({ hello: 'fast world' });
48+
},
49+
complete: () => done()
50+
});
51+
}));
4052
});

packages/operators/src/fetch/upload.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { concatMap, of } from 'rxjs';
2-
31
import { request } from './request';
42

53
export const upload = () => {

0 commit comments

Comments
 (0)