@@ -396,14 +396,12 @@ describe('ReactDOMServerIntegration', () => {
396396
397397 itRenders ( 'custom properties' , async render => {
398398 const e = await render ( < div style = { { '--foo' : 5 } } /> ) ;
399- // This seems like an odd way computed properties are exposed in jsdom.
400- // In a real browser we'd read it with e.style.getPropertyValue('--foo')
401- expect ( e . style . Foo ) . toBe ( '5' ) ;
399+ expect ( e . style . getPropertyValue ( '--foo' ) ) . toBe ( '5' ) ;
402400 } ) ;
403401
404402 itRenders ( 'camel cased custom properties' , async render => {
405403 const e = await render ( < div style = { { '--someColor' : '#000000' } } /> ) ;
406- expect ( e . style . SomeColor ) . toBe ( '#000000' ) ;
404+ expect ( e . style . getPropertyValue ( '--someColor' ) ) . toBe ( '#000000' ) ;
407405 } ) ;
408406
409407 itRenders ( 'no undefined styles' , async render => {
@@ -432,36 +430,40 @@ describe('ReactDOMServerIntegration', () => {
432430 < div
433431 style = { {
434432 lineClamp : 10 ,
435- WebkitLineClamp : 10 ,
436- MozFlexGrow : 10 ,
437- msFlexGrow : 10 ,
438- msGridRow : 10 ,
439- msGridRowEnd : 10 ,
440- msGridRowSpan : 10 ,
441- msGridRowStart : 10 ,
442- msGridColumn : 10 ,
443- msGridColumnEnd : 10 ,
444- msGridColumnSpan : 10 ,
445- msGridColumnStart : 10 ,
433+ // TODO: requires https://github.com/jsdom/cssstyle/pull/112
434+ // WebkitLineClamp: 10,
435+ // TODO: revisit once cssstyle or jsdom figures out
436+ // if they want to support other vendors or not
437+ // MozFlexGrow: 10,
438+ // msFlexGrow: 10,
439+ // msGridRow: 10,
440+ // msGridRowEnd: 10,
441+ // msGridRowSpan: 10,
442+ // msGridRowStart: 10,
443+ // msGridColumn: 10,
444+ // msGridColumnEnd: 10,
445+ // msGridColumnSpan: 10,
446+ // msGridColumnStart: 10,
446447 } }
447448 /> ,
448449 ) ;
449450
450451 expect ( style . lineClamp ) . toBe ( '10' ) ;
451- expect ( style . WebkitLineClamp ) . toBe ( '10' ) ;
452- expect ( style . MozFlexGrow ) . toBe ( '10' ) ;
452+ // see comment at inline styles above
453+ // expect(style.WebkitLineClamp).toBe('10');
454+ // expect(style.MozFlexGrow).toBe('10');
453455 // jsdom is inconsistent in the style property name
454456 // it uses on the client and when processing server markup.
455457 // But it should be there either way.
456- expect ( style . MsFlexGrow || style . msFlexGrow ) . toBe ( '10' ) ;
457- expect ( style . MsGridRow || style . msGridRow ) . toBe ( '10' ) ;
458- expect ( style . MsGridRowEnd || style . msGridRowEnd ) . toBe ( '10' ) ;
459- expect ( style . MsGridRowSpan || style . msGridRowSpan ) . toBe ( '10' ) ;
460- expect ( style . MsGridRowStart || style . msGridRowStart ) . toBe ( '10' ) ;
461- expect ( style . MsGridColumn || style . msGridColumn ) . toBe ( '10' ) ;
462- expect ( style . MsGridColumnEnd || style . msGridColumnEnd ) . toBe ( '10' ) ;
463- expect ( style . MsGridColumnSpan || style . msGridColumnSpan ) . toBe ( '10' ) ;
464- expect ( style . MsGridColumnStart || style . msGridColumnStart ) . toBe ( '10' ) ;
458+ // expect(style.MsFlexGrow || style.msFlexGrow).toBe('10');
459+ // expect(style.MsGridRow || style.msGridRow).toBe('10');
460+ // expect(style.MsGridRowEnd || style.msGridRowEnd).toBe('10');
461+ // expect(style.MsGridRowSpan || style.msGridRowSpan).toBe('10');
462+ // expect(style.MsGridRowStart || style.msGridRowStart).toBe('10');
463+ // expect(style.MsGridColumn || style.msGridColumn).toBe('10');
464+ // expect(style.MsGridColumnEnd || style.msGridColumnEnd).toBe('10');
465+ // expect(style.MsGridColumnSpan || style.msGridColumnSpan).toBe('10');
466+ // expect(style.MsGridColumnStart || style.msGridColumnStart).toBe('10');
465467 } ) ;
466468 } ) ;
467469
0 commit comments