@@ -36,6 +36,7 @@ describe('application logic', () => {
36
36
const nextState = next ( state ) ;
37
37
expect ( nextState ) . to . equal ( Map ( {
38
38
vote : Map ( {
39
+ round : 1 ,
39
40
pair : List . of ( 'Trainspotting' , '28 Days Later' )
40
41
} ) ,
41
42
entries : List . of ( 'Sunshine' )
@@ -46,6 +47,7 @@ describe('application logic', () => {
46
47
expect (
47
48
next ( Map ( {
48
49
vote : Map ( {
50
+ round : 1 ,
49
51
pair : List . of ( 'Trainspotting' , '28 Days Later' ) ,
50
52
tally : Map ( {
51
53
'Trainspotting' : 4 ,
@@ -57,6 +59,7 @@ describe('application logic', () => {
57
59
) . to . equal (
58
60
Map ( {
59
61
vote : Map ( {
62
+ round : 2 ,
60
63
pair : List . of ( 'Sunshine' , 'Millions' )
61
64
} ) ,
62
65
entries : List . of ( '127 Hours' , 'Trainspotting' )
@@ -68,6 +71,7 @@ describe('application logic', () => {
68
71
expect (
69
72
next ( Map ( {
70
73
vote : Map ( {
74
+ round : 1 ,
71
75
pair : List . of ( 'Trainspotting' , '28 Days Later' ) ,
72
76
tally : Map ( {
73
77
'Trainspotting' : 3 ,
@@ -79,6 +83,7 @@ describe('application logic', () => {
79
83
) . to . equal (
80
84
Map ( {
81
85
vote : Map ( {
86
+ round : 2 ,
82
87
pair : List . of ( 'Sunshine' , 'Millions' )
83
88
} ) ,
84
89
entries : List . of ( '127 Hours' , 'Trainspotting' , '28 Days Later' )
@@ -90,6 +95,7 @@ describe('application logic', () => {
90
95
expect (
91
96
next ( Map ( {
92
97
vote : Map ( {
98
+ round : 1 ,
93
99
pair : List . of ( 'Trainspotting' , '28 Days Later' ) ,
94
100
tally : Map ( {
95
101
'Trainspotting' : 4 ,
@@ -112,10 +118,12 @@ describe('application logic', () => {
112
118
it ( 'creates a tally for the voted entry' , ( ) => {
113
119
expect (
114
120
vote ( Map ( {
121
+ round : 1 ,
115
122
pair : List . of ( 'Trainspotting' , '28 Days Later' )
116
123
} ) , 'Trainspotting' )
117
124
) . to . equal (
118
125
Map ( {
126
+ round : 1 ,
119
127
pair : List . of ( 'Trainspotting' , '28 Days Later' ) ,
120
128
tally : Map ( {
121
129
'Trainspotting' : 1
@@ -127,6 +135,7 @@ describe('application logic', () => {
127
135
it ( 'adds to existing tally for the voted entry' , ( ) => {
128
136
expect (
129
137
vote ( Map ( {
138
+ round : 1 ,
130
139
pair : List . of ( 'Trainspotting' , '28 Days Later' ) ,
131
140
tally : Map ( {
132
141
'Trainspotting' : 3 ,
@@ -135,6 +144,7 @@ describe('application logic', () => {
135
144
} ) , 'Trainspotting' )
136
145
) . to . equal (
137
146
Map ( {
147
+ round : 1 ,
138
148
pair : List . of ( 'Trainspotting' , '28 Days Later' ) ,
139
149
tally : Map ( {
140
150
'Trainspotting' : 4 ,
@@ -147,10 +157,12 @@ describe('application logic', () => {
147
157
it ( 'ignores the vote if for an invalid entry' , ( ) => {
148
158
expect (
149
159
vote ( Map ( {
160
+ round : 1 ,
150
161
pair : List . of ( 'Trainspotting' , '28 Days Later' )
151
162
} ) , 'Sunshine' )
152
163
) . to . equal (
153
164
Map ( {
165
+ round : 1 ,
154
166
pair : List . of ( 'Trainspotting' , '28 Days Later' )
155
167
} )
156
168
) ;
0 commit comments