@@ -408,7 +408,11 @@ describe('unexpected-dom', function() {
408
408
expect ( body . firstChild , 'to have class' , 'quux' ) ;
409
409
} ,
410
410
'to throw' ,
411
- 'expected <button class="bar" data-info="baz" disabled id="foo">Press me</button> to have class \'quux\'\n' +
411
+ 'expected\n' +
412
+ '<button class="bar" data-info="baz" disabled id="foo">\n' +
413
+ ' Press me\n' +
414
+ '</button>\n' +
415
+ "to have class 'quux'\n" +
412
416
'\n' +
413
417
'<button\n' +
414
418
' id="foo"\n' +
@@ -435,7 +439,10 @@ describe('unexpected-dom', function() {
435
439
expect ( body . firstChild , 'to have classes' , [ 'quux' , 'bar' ] ) ;
436
440
} ,
437
441
'to throw' ,
438
- 'expected <button class="bar" data-info="baz" disabled id="foo">Press me</button>\n' +
442
+ 'expected\n' +
443
+ '<button class="bar" data-info="baz" disabled id="foo">\n' +
444
+ ' Press me\n' +
445
+ '</button>\n' +
439
446
"to have classes [ 'quux', 'bar' ]\n" +
440
447
'\n' +
441
448
'<button\n' +
@@ -464,7 +471,10 @@ describe('unexpected-dom', function() {
464
471
expect ( body . firstChild , 'to only have class' , 'quux' ) ;
465
472
} ,
466
473
'to throw' ,
467
- 'expected <button class="bar quux" data-info="baz" disabled id="foo">Press me</button>\n' +
474
+ 'expected\n' +
475
+ '<button class="bar quux" data-info="baz" disabled id="foo">\n' +
476
+ ' Press me\n' +
477
+ '</button>\n' +
468
478
"to only have class 'quux'\n" +
469
479
'\n' +
470
480
'<button\n' +
@@ -497,7 +507,10 @@ describe('unexpected-dom', function() {
497
507
expect ( body . firstChild , 'to only have classes' , [ 'quux' , 'bar' ] ) ;
498
508
} ,
499
509
'to throw' ,
500
- 'expected <button class="bar quux foo" data-info="baz" disabled id="foo">Press me</button>\n' +
510
+ 'expected\n' +
511
+ '<button class="bar quux foo" data-info="baz" disabled id="foo">\n' +
512
+ ' Press me\n' +
513
+ '</button>\n' +
501
514
"to only have classes [ 'bar', 'quux' ]\n" +
502
515
'\n' +
503
516
'<button\n' +
@@ -544,7 +557,10 @@ describe('unexpected-dom', function() {
544
557
expect ( el , 'to only have attributes' , 'id' ) ;
545
558
} ,
546
559
'to throw' ,
547
- 'expected <button class="bar" data-info="baz" disabled id="foo">Press me</button>\n' +
560
+ 'expected\n' +
561
+ '<button class="bar" data-info="baz" disabled id="foo">\n' +
562
+ ' Press me\n' +
563
+ '</button>\n' +
548
564
"to only have attributes 'id'\n" +
549
565
'\n' +
550
566
'<button\n' +
@@ -573,7 +589,10 @@ describe('unexpected-dom', function() {
573
589
expect ( el , 'to have attributes' , 'id' , 'foo' ) ;
574
590
} ,
575
591
'to throw' ,
576
- 'expected <button class="bar" data-info="baz" disabled id="foo">Press me</button>\n' +
592
+ 'expected\n' +
593
+ '<button class="bar" data-info="baz" disabled id="foo">\n' +
594
+ ' Press me\n' +
595
+ '</button>\n' +
577
596
"to have attributes 'id', 'foo'\n" +
578
597
'\n' +
579
598
'<button\n' +
@@ -610,7 +629,10 @@ describe('unexpected-dom', function() {
610
629
expect ( el , 'to only have attributes' , [ 'id' ] ) ;
611
630
} ,
612
631
'to throw' ,
613
- 'expected <button class="bar" data-info="baz" disabled id="foo">Press me</button>\n' +
632
+ 'expected\n' +
633
+ '<button class="bar" data-info="baz" disabled id="foo">\n' +
634
+ ' Press me\n' +
635
+ '</button>\n' +
614
636
"to only have attributes [ 'id' ]\n" +
615
637
'\n' +
616
638
'<button\n' +
@@ -639,7 +661,10 @@ describe('unexpected-dom', function() {
639
661
expect ( el , 'to have attributes' , [ 'id' , 'foo' ] ) ;
640
662
} ,
641
663
'to throw' ,
642
- 'expected <button class="bar" data-info="baz" disabled id="foo">Press me</button>\n' +
664
+ 'expected\n' +
665
+ '<button class="bar" data-info="baz" disabled id="foo">\n' +
666
+ ' Press me\n' +
667
+ '</button>\n' +
643
668
"to have attributes [ 'id', 'foo' ]\n" +
644
669
'\n' +
645
670
'<button\n' +
@@ -705,7 +730,18 @@ describe('unexpected-dom', function() {
705
730
} ) ;
706
731
} ,
707
732
'to throw' ,
708
- / ^ e x p e c t e d < b u t t o n c l a s s = " b a r " d a t a - i n f o = " b a z " d i s a b l e d i d = " f o o " > P r e s s m e < \/ b u t t o n > \n t o o n l y h a v e a t t r i b u t e s /
733
+ 'expected\n' +
734
+ '<button class="bar" data-info="baz" disabled id="foo">\n' +
735
+ ' Press me\n' +
736
+ '</button>\n' +
737
+ "to only have attributes { id: 'foo' }\n" +
738
+ '\n' +
739
+ '<button\n' +
740
+ ' id="foo"\n' +
741
+ ' class="bar" // should be removed\n' +
742
+ ' data-info="baz" // should be removed\n' +
743
+ ' disabled // should be removed\n' +
744
+ '>Press me</button>'
709
745
) ;
710
746
} ) ;
711
747
@@ -732,7 +768,19 @@ describe('unexpected-dom', function() {
732
768
} ) ;
733
769
} ,
734
770
'to throw' ,
735
- / e x p e c t e d < b u t t o n c l a s s = " b a r " d a t a - i n f o = " b a z " d i s a b l e d i d = " f o o " > P r e s s m e < \/ b u t t o n > \n t o h a v e a t t r i b u t e s /
771
+ 'expected\n' +
772
+ '<button class="bar" data-info="baz" disabled id="foo">\n' +
773
+ ' Press me\n' +
774
+ '</button>\n' +
775
+ "to have attributes { id: 'foo', foo: 'bar' }\n" +
776
+ '\n' +
777
+ '<button\n' +
778
+ ' id="foo"\n' +
779
+ ' class="bar"\n' +
780
+ ' data-info="baz"\n' +
781
+ ' disabled\n' +
782
+ " // missing foo should equal 'bar'\n" +
783
+ '>Press me</button>'
736
784
) ;
737
785
} ) ;
738
786
0 commit comments