diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-13 16:07:40 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-03-18 11:17:59 +0100 |
commit | d0e1e32589f4e76446eb84a3ec8e7fea39963412 (patch) | |
tree | 201423c677e61490d8e289a9cb9f39cc0e76e3ed /client/src/app/videos/recommendations/recommended-videos.store.spec.ts | |
parent | 0b16f5f2202e0c0832b5e678fadd95c64b8e8789 (diff) | |
download | PeerTube-d0e1e32589f4e76446eb84a3ec8e7fea39963412.tar.gz PeerTube-d0e1e32589f4e76446eb84a3ec8e7fea39963412.tar.zst PeerTube-d0e1e32589f4e76446eb84a3ec8e7fea39963412.zip |
Remove jest tests
I don't have time to maintain them
Diffstat (limited to 'client/src/app/videos/recommendations/recommended-videos.store.spec.ts')
-rw-r--r-- | client/src/app/videos/recommendations/recommended-videos.store.spec.ts | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/client/src/app/videos/recommendations/recommended-videos.store.spec.ts b/client/src/app/videos/recommendations/recommended-videos.store.spec.ts deleted file mode 100644 index e12a3f520..000000000 --- a/client/src/app/videos/recommendations/recommended-videos.store.spec.ts +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | import { RecommendedVideosStore } from '@app/videos/recommendations/recommended-videos.store' | ||
2 | import { RecommendationService } from '@app/videos/recommendations/recommendations.service' | ||
3 | |||
4 | describe('RecommendedVideosStore', () => { | ||
5 | describe('requestNewRecommendations', () => { | ||
6 | let store: RecommendedVideosStore | ||
7 | let service: RecommendationService | ||
8 | beforeEach(() => { | ||
9 | service = { | ||
10 | getRecommendations: jest.fn(() => new Promise((r) => r())) | ||
11 | } | ||
12 | store = new RecommendedVideosStore(service) | ||
13 | }) | ||
14 | it('should pull new videos from the service one time when given the same UUID twice', () => { | ||
15 | store.requestNewRecommendations('some-uuid') | ||
16 | store.requestNewRecommendations('some-uuid') | ||
17 | // Requests aren't fulfilled until someone asks for them (ie: subscribes) | ||
18 | store.recommendations$.subscribe() | ||
19 | expect(service.getRecommendations).toHaveBeenCalledTimes(1) | ||
20 | }) | ||
21 | }) | ||
22 | }) | ||