Add .prop to chai-jquery assertions (#13393)

* Add .prop to chai-jquery assertions

* Fix tabs instead of spaces
This commit is contained in:
Sam Noedel
2016-12-28 20:01:00 -08:00
committed by Andy
parent 1d1f0c82dd
commit 92a39091b5
2 changed files with 6 additions and 0 deletions

View File

@@ -11,6 +11,11 @@ function test_attr() {
expect($('#foo')).to.have.attr('class', 'container');
}
function test_prop() {
expect($('#foo')).to.have.prop('disabled');
expect($('#foo')).to.have.prop('disabled', false);
}
function test_css() {
expect($('#foo')).to.have.css('color');
expect($('#foo')).to.have.css('font-family', 'serif');

View File

@@ -10,6 +10,7 @@ declare namespace Chai {
interface Assertion {
attr: (name: string, value?: string) => Assertion;
prop: (name: string, value?: any) => Assertion;
css: (name: string, value?: string) => Assertion;
data: (name: string, value?: string) => Assertion;
class(className: string): Assertion;