@@ -11,18 +11,22 @@ describe('playbackState', () => {
11
11
assert . strictEqual ( playbackReducer ( undefined , '' ) . isPlaying , false ) ;
12
12
} ) ;
13
13
14
- it ( 'sets the property to true when passed in an isPlaying action with isPlaying set to true' , ( ) => {
15
- assert . strictEqual ( playbackReducer ( undefined , {
14
+ it ( '{isPlaying: true, isPaused: false} when isPlaying is true' , ( ) => {
15
+ const state = playbackReducer ( undefined , {
16
16
type : IS_PLAYING ,
17
17
isPlaying : true
18
- } ) . isPlaying , true ) ;
18
+ } ) ;
19
+ assert . strictEqual ( state . isPlaying , true ) ;
20
+ assert . strictEqual ( state . isPaused , false ) ;
19
21
} ) ;
20
22
21
- it ( 'sets the property to false when passed in an isPlaying action with isPlaying set to false' , ( ) => {
22
- assert . strictEqual ( playbackReducer ( undefined , {
23
+ it ( '{isPlaying: false, isPaused: true} when isPlaying is false' , ( ) => {
24
+ const state = playbackReducer ( undefined , {
23
25
type : IS_PLAYING ,
24
26
isPlaying : false
25
- } ) . isPlaying , false ) ;
27
+ } ) ;
28
+ assert . strictEqual ( state . isPlaying , false ) ;
29
+ assert . strictEqual ( state . isPaused , true ) ;
26
30
} ) ;
27
31
} ) ;
28
32
@@ -31,18 +35,22 @@ describe('playbackState', () => {
31
35
assert . strictEqual ( playbackReducer ( undefined , '' ) . isPaused , false ) ;
32
36
} ) ;
33
37
34
- it ( 'sets the property to true when passed in an isPaused action with isPaused set to true' , ( ) => {
35
- assert . strictEqual ( playbackReducer ( undefined , {
38
+ it ( '{isPlaying: false, isPaused: true} when isPaused is true' , ( ) => {
39
+ const state = playbackReducer ( undefined , {
36
40
type : IS_PAUSED ,
37
41
isPaused : true
38
- } ) . isPaused , true ) ;
42
+ } ) ;
43
+ assert . strictEqual ( state . isPaused , true ) ;
44
+ assert . strictEqual ( state . isPlaying , false ) ;
39
45
} ) ;
40
46
41
- it ( 'sets the property to false when passed in an isPaused action with isPaused set to false' , ( ) => {
42
- assert . strictEqual ( playbackReducer ( undefined , {
47
+ it ( '{isPlaying: true, isPaused: false} when isPaused is false' , ( ) => {
48
+ const state = playbackReducer ( undefined , {
43
49
type : IS_PAUSED ,
44
50
isPaused : false
45
- } ) . isPaused , false ) ;
51
+ } ) ;
52
+ assert . strictEqual ( state . isPaused , false ) ;
53
+ assert . strictEqual ( state . isPlaying , true ) ;
46
54
} ) ;
47
55
} ) ;
48
56
} ) ;
0 commit comments