mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
Add .prop to chai-jquery assertions (#13393)
* Add .prop to chai-jquery assertions * Fix tabs instead of spaces
This commit is contained in:
@@ -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');
|
||||
|
||||
1
chai-jquery/index.d.ts
vendored
1
chai-jquery/index.d.ts
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user