@@ -88,22 +88,22 @@ describe('Helpers', () => {
8888 expect ( modifiers . indexOf ( 'maybe' ) ) . to . equal ( - 1 ) ;
8989 expect ( modifiers . indexOf ( 'no' ) ) . to . equal ( - 1 ) ;
9090 } ) ;
91- it ( 'accepts a single day' , ( ) => {
91+ it ( 'returns the modifier for a single day' , ( ) => {
9292 const modifiers = Helpers . getModifiersForDay ( new Date ( 2015 , 8 , 19 ) , {
9393 foo : new Date ( 2015 , 8 , 19 ) ,
9494 } ) ;
9595 expect ( modifiers ) . to . have . length ( 1 ) ;
9696 expect ( modifiers . indexOf ( 'foo' ) ) . to . equal ( 0 ) ;
9797 } ) ;
98- it ( 'ignore falsy values' , ( ) => {
98+ it ( 'ignores falsy values' , ( ) => {
9999 const modifiers = Helpers . getModifiersForDay ( new Date ( 2015 , 8 , 19 ) , {
100100 foo : null ,
101101 bar : false ,
102102 } ) ;
103103 expect ( modifiers ) . to . have . length ( 0 ) ;
104104 expect ( modifiers . indexOf ( 'foo' ) ) . to . equal ( - 1 ) ;
105105 } ) ;
106- it ( 'accepts an array of days' , ( ) => {
106+ it ( 'returns the modifier for an array of days' , ( ) => {
107107 const modifiersObj = {
108108 foo : [
109109 new Date ( 2015 , 8 , 19 ) ,
@@ -147,7 +147,7 @@ describe('Helpers', () => {
147147 expect ( modifiers ) . to . have . length ( 1 ) ;
148148 expect ( modifiers . indexOf ( 'foo' ) ) . to . be . above ( - 1 ) ;
149149 } ) ;
150- it ( 'accepts a single range of days' , ( ) => {
150+ it ( 'returns the modifier for a range of days' , ( ) => {
151151 const range = {
152152 foo : {
153153 from : new Date ( 2015 , 8 , 18 ) ,
@@ -166,7 +166,7 @@ describe('Helpers', () => {
166166 ) ;
167167 expect ( modifiers2 ) . to . have . length ( 0 ) ;
168168 } ) ;
169- it ( 'accepts multiple ranges of days' , ( ) => {
169+ it ( 'returns the modifier for multiple ranges of days' , ( ) => {
170170 const ranges = {
171171 foo : [
172172 {
@@ -190,7 +190,7 @@ describe('Helpers', () => {
190190 ) ;
191191 expect ( modifiers2 . indexOf ( 'foo' ) ) . to . equal ( 0 ) ;
192192 } ) ;
193- it ( 'accepts an "after" modifier' , ( ) => {
193+ it ( 'returns an "after" modifier' , ( ) => {
194194 const afterModifier = {
195195 foo : {
196196 after : new Date ( 2015 , 8 , 18 ) ,
@@ -203,7 +203,7 @@ describe('Helpers', () => {
203203 expect ( modifiers ) . to . have . length ( 1 ) ;
204204 expect ( modifiers . indexOf ( 'foo' ) ) . to . equal ( 0 ) ;
205205 } ) ;
206- it ( 'accepts an "after" modifier in an array of days' , ( ) => {
206+ it ( 'returns an "after" modifier in an array of days' , ( ) => {
207207 const afterModifier = {
208208 foo : [ { after : new Date ( 2015 , 8 , 18 ) } ] ,
209209 } ;
@@ -214,20 +214,20 @@ describe('Helpers', () => {
214214 expect ( modifiers ) . to . have . length ( 1 ) ;
215215 expect ( modifiers . indexOf ( 'foo' ) ) . to . equal ( 0 ) ;
216216 } ) ;
217- it ( 'accepts a "before" modifier' , ( ) => {
218- const afterModifier = {
217+ it ( 'returns a "before" modifier' , ( ) => {
218+ const beforeModifier = {
219219 foo : {
220220 before : new Date ( 2015 , 8 , 15 ) ,
221221 } ,
222222 } ;
223223 const modifiers = Helpers . getModifiersForDay (
224224 new Date ( 2015 , 8 , 10 ) ,
225- afterModifier
225+ beforeModifier
226226 ) ;
227227 expect ( modifiers ) . to . have . length ( 1 ) ;
228228 expect ( modifiers . indexOf ( 'foo' ) ) . to . equal ( 0 ) ;
229229 } ) ;
230- it ( 'accepts a "before" modifier in an array of days' , ( ) => {
230+ it ( 'returns a "before" modifier in an array of days' , ( ) => {
231231 const afterModifier = {
232232 foo : [ { before : new Date ( 2015 , 8 , 15 ) } ] ,
233233 } ;
@@ -238,7 +238,7 @@ describe('Helpers', () => {
238238 expect ( modifiers ) . to . have . length ( 1 ) ;
239239 expect ( modifiers . indexOf ( 'foo' ) ) . to . equal ( 0 ) ;
240240 } ) ;
241- it ( 'work with a mix of functions and days ' , ( ) => {
241+ it ( 'works with mixing functions and other objects ' , ( ) => {
242242 const mixedModifiers = {
243243 foo : [
244244 { before : new Date ( 2015 , 8 , 15 ) } ,
0 commit comments