@@ -324,7 +324,7 @@ describe('react-draggable', function () {
324324 } ) ;
325325
326326 it ( 'should add and remove user-select styles' , function ( ) {
327- const userSelectStyleStr = `; ${ userSelectStyle } : none;` ;
327+ const userSelectStyleStr = `${ userSelectStyle } : none;` ;
328328
329329 drag = TestUtils . renderIntoDocument (
330330 < Draggable >
@@ -334,11 +334,11 @@ describe('react-draggable', function () {
334334
335335 const node = ReactDOM . findDOMNode ( drag ) ;
336336
337- assert ( document . body . getAttribute ( 'style' ) === '' ) ;
337+ assert ( ! document . body . getAttribute ( 'style' ) ) ;
338338 TestUtils . Simulate . mouseDown ( node , { clientX : 0 , clientY : 0 } ) ;
339- assert ( document . body . getAttribute ( 'style' ) === userSelectStyleStr ) ;
339+ assert ( document . body . getAttribute ( 'style' ) . indexOf ( userSelectStyleStr ) !== - 1 ) ;
340340 TestUtils . Simulate . mouseUp ( node ) ;
341- assert ( document . body . getAttribute ( 'style' ) === '' ) ;
341+ assert ( ! document . body . getAttribute ( 'style' ) ) ;
342342 } ) ;
343343
344344 it ( 'should not add and remove user-select styles when disabled' , function ( ) {
@@ -351,11 +351,11 @@ describe('react-draggable', function () {
351351
352352 const node = ReactDOM . findDOMNode ( drag ) ;
353353
354- assert ( document . body . getAttribute ( 'style' ) === '' ) ;
354+ assert ( ! document . body . getAttribute ( 'style' ) ) ;
355355 TestUtils . Simulate . mouseDown ( node , { clientX : 0 , clientY : 0 } ) ;
356- assert ( document . body . getAttribute ( 'style' ) === '' ) ;
356+ assert ( ! document . body . getAttribute ( 'style' ) ) ;
357357 TestUtils . Simulate . mouseUp ( node ) ;
358- assert ( document . body . getAttribute ( 'style' ) === '' ) ;
358+ assert ( ! document . body . getAttribute ( 'style' ) ) ;
359359 } ) ;
360360
361361 it ( 'should not add and remove user-select styles when onStart returns false' , function ( ) {
@@ -369,11 +369,11 @@ describe('react-draggable', function () {
369369
370370 const node = ReactDOM . findDOMNode ( drag ) ;
371371
372- assert ( document . body . getAttribute ( 'style' ) === '' ) ;
372+ assert ( ! document . body . getAttribute ( 'style' ) ) ;
373373 TestUtils . Simulate . mouseDown ( node , { clientX : 0 , clientY : 0 } ) ;
374- assert ( document . body . getAttribute ( 'style' ) === '' ) ;
374+ assert ( ! document . body . getAttribute ( 'style' ) ) ;
375375 TestUtils . Simulate . mouseUp ( node ) ;
376- assert ( document . body . getAttribute ( 'style' ) === '' ) ;
376+ assert ( ! document . body . getAttribute ( 'style' ) ) ;
377377 } ) ;
378378
379379 it ( 'should be draggable when in an iframe' , function ( done ) {
@@ -401,7 +401,7 @@ describe('react-draggable', function () {
401401 } ) ;
402402
403403 it ( 'should add and remove user-select styles to iframe’s body when in an iframe' , function ( done ) {
404- const userSelectStyleStr = `; ${ userSelectStyle } : none;` ;
404+ const userSelectStyleStr = `${ userSelectStyle } : none;` ;
405405
406406 const dragElement = (
407407 < Draggable onDrag = { function ( ) { dragged = true ; } } >
@@ -416,14 +416,14 @@ describe('react-draggable', function () {
416416 const node = iframeDoc . querySelector ( '.react-draggable' ) ;
417417 iframeDoc . body . setAttribute ( 'style' , '' ) ;
418418
419- assert ( iframeDoc . body . getAttribute ( 'style' ) === '' ) ;
420- assert ( document . body . getAttribute ( 'style' ) === '' ) ;
419+ assert ( ! iframeDoc . body . getAttribute ( 'style' ) ) ;
420+ assert ( ! document . body . getAttribute ( 'style' ) ) ;
421421 TestUtils . Simulate . mouseDown ( node , { clientX : 0 , clientY : 0 } ) ;
422- assert ( iframeDoc . body . getAttribute ( 'style' ) === userSelectStyleStr ) ;
423- assert ( document . body . getAttribute ( 'style' ) === '' ) ;
422+ assert ( iframeDoc . body . getAttribute ( 'style' ) . indexOf ( userSelectStyleStr ) !== - 1 ) ;
423+ assert ( ! document . body . getAttribute ( 'style' ) ) ;
424424 TestUtils . Simulate . mouseUp ( node ) ;
425- assert ( iframeDoc . body . getAttribute ( 'style' ) === '' ) ;
426- assert ( document . body . getAttribute ( 'style' ) === '' ) ;
425+ assert ( ! iframeDoc . body . getAttribute ( 'style' ) ) ;
426+ assert ( ! document . body . getAttribute ( 'style' ) ) ;
427427
428428 renderRoot . parentNode . removeChild ( renderRoot ) ;
429429 done ( ) ;
0 commit comments