Skip to content

Commit

Permalink
Merge pull request #7586 from ckeditor/fix-attribute-assertion-message
Browse files Browse the repository at this point in the history
Tests (core): Fix the placement of the actual and expected values in the attribute assertion message.
  • Loading branch information
jodator authored Jul 10, 2020
2 parents 8b83c9b + b49e8f7 commit e023fd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe( 'attribute chai assertion', () => {
hasAttribute: () => true,
getAttribute: () => 'bar'
} ).to.have.attribute( 'foo', 'baz' );
} ).to.throw( 'expected { Object (hasAttribute, getAttribute) } to have attribute \'foo\' of \'bar\', but got \'baz\'' );
} ).to.throw( 'expected { Object (hasAttribute, getAttribute) } to have attribute \'foo\' of \'baz\', but got \'bar\'' );
} );

it( 'negated, should assert for the given type the \'target.getAttribute\' returns a value different than the given one', () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/ckeditor5-core/tests/_utils/assertions/attribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ chai.Assertion.addMethod( 'attribute', function attributeAssertion( key, value,
attributeValue === value,
`expected #{this} to have attribute '${ key }' of #{exp}, but got #{act}`,
`expected #{this} to not have attribute '${ key }' of #{exp}`,
attributeValue,
value
value,
attributeValue
);
}
} );

0 comments on commit e023fd6

Please sign in to comment.