This repository has been archived by the owner on Dec 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Album.test.js
96 lines (94 loc) 路 2.99 KB
/
Album.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router } from 'react-router-dom';
import AlbumPresenter from './AlbumPresenter';
import AppWrapper from '../../AppWrapper';
const album = {
_id: '5ba65b4af01f4b08931993d5',
tracks: [
{
_id: '5ba1026d2c0d2b2bb277a6bf',
title: 'Falling',
edit: 'Mynox Remix',
label: 'Art Vibes Music',
audiourl:
'https://s3.eu-west-3.amazonaws.com/openjamaudio/D1rty+Kickz+-+Falling+(Mynox+Remix)+%5BArt+Vibes+Music%5D.mp3',
coverurl: {
w200:
'https://s3.eu-west-3.amazonaws.com/openjamcover/200w/Art+Vibes+Music+-+EP+-+Falling_200w.jpg',
w400:
'https://s3.eu-west-3.amazonaws.com/openjamcover/400w/Art+Vibes+Music+-+EP+-+Falling_400w.jpg',
w800:
'https://s3.eu-west-3.amazonaws.com/openjamcover/800w/Art+Vibes+Music+-+EP+-+Falling_800w.jpg',
},
artists: [{ _id: '5ba64a899c1fdeb5b063165f', name: 'D1rty Kickz', type: 'artist' }],
date: '2018-09-18T13:44:53.247Z',
track_number: 2,
type: 'track',
explicit: false,
disc_number: 1,
popularity: 0,
},
{
_id: '5ba1027c2c0d2b2bb277a6c0',
title: 'Falling',
label: 'Art Vibes Music',
audiourl:
'https://s3.eu-west-3.amazonaws.com/openjamaudio/D1rty+Kickz+-+Falling+%5BArt+Vibes+Music%5D.mp3',
coverurl: {
w200:
'https://s3.eu-west-3.amazonaws.com/openjamcover/200w/Art+Vibes+Music+-+EP+-+Falling_200w.jpg',
w400:
'https://s3.eu-west-3.amazonaws.com/openjamcover/400w/Art+Vibes+Music+-+EP+-+Falling_400w.jpg',
w800:
'https://s3.eu-west-3.amazonaws.com/openjamcover/800w/Art+Vibes+Music+-+EP+-+Falling_800w.jpg',
},
artists: [{ _id: '5ba64a899c1fdeb5b063165f', name: 'D1rty Kickz', type: 'artist' }],
date: '2018-09-18T13:44:53.247Z',
track_number: 1,
type: 'track',
explicit: false,
disc_number: 1,
popularity: 0,
},
],
name: 'Falling',
label: { _id: '5ba65421f10853089344acaf', name: 'Art Vibes Music', type: 'label' },
type: 'album',
images: [
{
width: 200,
height: 200,
href:
'https://s3.eu-west-3.amazonaws.com/openjamcover/200w/Art+Vibes+Music+-+EP+-+Falling_200w.jpg',
},
{
width: 400,
height: 400,
href:
'https://s3.eu-west-3.amazonaws.com/openjamcover/400w/Art+Vibes+Music+-+EP+-+Falling_400w.jpg',
},
{
width: 800,
height: 800,
href:
'https://s3.eu-west-3.amazonaws.com/openjamcover/800w/Art+Vibes+Music+-+EP+-+Falling_800w.jpg',
},
],
release_date: '2015-07-23T00:00:00.000Z',
release_date_precision: 'day',
popularity: 0,
album_type: 'EP',
};
it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(
<AppWrapper>
<Router>
<AlbumPresenter album={album} />
</Router>
</AppWrapper>,
div,
);
ReactDOM.unmountComponentAtNode(div);
});