-
Notifications
You must be signed in to change notification settings - Fork 561
Expand file tree
/
Copy pathmap3.test.js
More file actions
52 lines (48 loc) · 958 Bytes
/
map3.test.js
File metadata and controls
52 lines (48 loc) · 958 Bytes
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
const getMoviesFreshness = require('../map/ex3.js');
describe('map - exercice 3', () => {
test('getMoviesFreshness', () => {
expect(getMoviesFreshness(
[
{
name: 'Crazy Rich Asians',
rating: 93
},
{
name: 'Skyscraper',
rating: 46
},
{
name: 'Leave No Trace',
rating: 100
},
{
name: 'White Boy Rick',
rating: 60
}
]
)).toEqual(
[
{
name: 'Crazy Rich Asians',
rating: 93,
label: 'certified fresh'
},
{
name: 'Skyscraper',
rating: 46,
label: 'rotten'
},
{
name: 'Leave No Trace',
rating: 100,
label: 'certified fresh'
},
{
name: 'White Boy Rick',
rating: 60,
label: 'fresh'
}
]
);
});
});