This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -365,13 +365,15 @@ beforeEach(function() {
365
365
return {
366
366
compare : function ( actual ) {
367
367
var errors = [ ] ;
368
+ var optionVal = toJson ( actual . value ) ;
369
+
368
370
if ( actual . selected === null || typeof actual . selected === 'undefined' || actual . selected === false ) {
369
- errors . push ( 'Expected option property "selected" to be truthy' ) ;
371
+ errors . push ( 'Expected option with value ' + optionVal + ' to have property "selected" set to truthy') ;
370
372
}
371
373
372
374
// Support: IE 9 only
373
375
if ( msie !== 9 && actual . hasAttribute ( 'selected' ) === false ) {
374
- errors . push ( 'Expected option to have attribute "selected"' ) ;
376
+ errors . push ( 'Expected option with value ' + optionVal + ' to have attribute "selected"') ;
375
377
}
376
378
377
379
var result = {
@@ -383,13 +385,15 @@ beforeEach(function() {
383
385
} ,
384
386
negativeCompare : function ( actual ) {
385
387
var errors = [ ] ;
388
+ var optionVal = toJson ( actual . value ) ;
389
+
386
390
if ( actual . selected ) {
387
- errors . push ( 'Expected option property "selected" to be falsy' ) ;
391
+ errors . push ( 'Expected option with value ' + optionVal + ' property "selected" to be falsy') ;
388
392
}
389
393
390
394
// Support: IE 9 only
391
395
if ( msie !== 9 && actual . hasAttribute ( 'selected' ) ) {
392
- errors . push ( 'Expected option not to have attribute "selected"' ) ;
396
+ errors . push ( 'Expected option with value ' + optionVal + ' not to have attribute "selected"') ;
393
397
}
394
398
395
399
var result = {
You can’t perform that action at this time.
0 commit comments