@@ -3,7 +3,7 @@ const attributesToProps = require('../lib/attributes-to-props');
33const utilities = require ( '../lib/utilities' ) ;
44
55describe ( 'attributesToProps' , ( ) => {
6- describe ( 'HTML DOM ' , ( ) => {
6+ describe ( 'HTML' , ( ) => {
77 it ( 'converts attributes to React props' , ( ) => {
88 assert . deepEqual (
99 attributesToProps ( {
@@ -19,7 +19,7 @@ describe('attributesToProps', () => {
1919 ) ;
2020 } ) ;
2121
22- it ( 'converts standard properties to React props' , ( ) => {
22+ it ( 'converts standard attributes to React props' , ( ) => {
2323 assert . deepEqual (
2424 attributesToProps ( {
2525 allowfullscreen : true ,
@@ -34,7 +34,7 @@ describe('attributesToProps', () => {
3434 ) ;
3535 } ) ;
3636
37- it ( 'converts RDFa properties to React props' , ( ) => {
37+ it ( 'converts RDFa attributes to React props' , ( ) => {
3838 assert . deepEqual (
3939 attributesToProps ( {
4040 property : 'foo' ,
@@ -47,7 +47,7 @@ describe('attributesToProps', () => {
4747 ) ;
4848 } ) ;
4949
50- it ( 'converts non-standard properties to React props' , ( ) => {
50+ it ( 'converts non-standard attributes to React props' , ( ) => {
5151 assert . deepEqual (
5252 attributesToProps ( {
5353 itemscope : true ,
@@ -73,7 +73,7 @@ describe('attributesToProps', () => {
7373 ) ;
7474 } ) ;
7575
76- it ( 'converts properties with weird capitalization' , ( ) => {
76+ it ( 'converts attributes with weird capitalization' , ( ) => {
7777 assert . deepEqual (
7878 attributesToProps ( {
7979 'ACCEPT-CHARSET' : 'ISO-8859-1' ,
@@ -90,7 +90,7 @@ describe('attributesToProps', () => {
9090 ) ;
9191 } ) ;
9292
93- it ( 'converts bool properties ' , ( ) => {
93+ it ( 'converts boolean attributes ' , ( ) => {
9494 assert . deepEqual (
9595 attributesToProps ( {
9696 readonly : ''
@@ -111,8 +111,8 @@ describe('attributesToProps', () => {
111111 } ) ;
112112 } ) ;
113113
114- describe ( 'SVG DOM properties ' , ( ) => {
115- it ( 'converts attributes/properties to React props' , ( ) => {
114+ describe ( 'SVG' , ( ) => {
115+ it ( 'converts attributes to React props' , ( ) => {
116116 assert . deepEqual (
117117 attributesToProps ( {
118118 edgeMode : 'edgeMode' ,
@@ -152,8 +152,7 @@ describe('attributesToProps', () => {
152152 } ) ;
153153
154154 describe ( 'style' , ( ) => {
155- it ( 'converts CSS style string to JS style object' , ( ) => {
156- // proper css
155+ it ( 'converts inline style to object' , ( ) => {
157156 assert . deepEqual (
158157 attributesToProps ( {
159158 style :
@@ -171,7 +170,6 @@ describe('attributesToProps', () => {
171170 }
172171 ) ;
173172
174- // valid but messy
175173 assert . deepEqual (
176174 attributesToProps ( {
177175 style :
@@ -187,7 +185,6 @@ describe('attributesToProps', () => {
187185 }
188186 ) ;
189187
190- // style is null
191188 assert . deepEqual (
192189 attributesToProps ( {
193190 style : null
@@ -197,7 +194,6 @@ describe('attributesToProps', () => {
197194 }
198195 ) ;
199196
200- // style is undefined
201197 assert . deepEqual (
202198 attributesToProps ( {
203199 style : undefined
@@ -207,7 +203,6 @@ describe('attributesToProps', () => {
207203 }
208204 ) ;
209205
210- // style is empty string
211206 assert . deepEqual (
212207 attributesToProps ( {
213208 style : ''
@@ -218,7 +213,7 @@ describe('attributesToProps', () => {
218213 ) ;
219214 } ) ;
220215
221- [ Object , Array , Number , Date ] . forEach ( type => {
216+ [ Object , Array , Number , Date , Function ] . forEach ( type => {
222217 it ( `throws an error when attributes.style=${ type . name } ` , ( ) => {
223218 assert . throws (
224219 ( ) => {
@@ -244,7 +239,7 @@ describe('attributesToProps', () => {
244239 utilities . PRESERVE_CUSTOM_ATTRIBUTES = PRESERVE_CUSTOM_ATTRIBUTES ;
245240 } ) ;
246241
247- it ( 'does not include unknown attributes' , ( ) => {
242+ it ( 'omits unknown attributes' , ( ) => {
248243 assert . deepEqual (
249244 attributesToProps ( {
250245 unknownAttribute : 'someValue'
0 commit comments