diff --git a/types/index.d.ts b/types/index.d.ts index 295f3df98..066075b9f 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -47,9 +47,9 @@ interface BaseWrapper { exists (): boolean visible (): boolean - attributes(): { [name: string]: string } | void + attributes(): { [name: string]: string } classes(): Array | void - props(): { [name: string]: any } | void + props(): { [name: string]: any } hasAttribute (attribute: string, value: string): boolean hasClass (className: string): boolean diff --git a/types/test/wrapper.ts b/types/test/wrapper.ts index f92d79632..2fd24a347 100644 --- a/types/test/wrapper.ts +++ b/types/test/wrapper.ts @@ -13,8 +13,10 @@ bool = wrapper.contains(ClassComponent) bool = wrapper.exists() bool = wrapper.hasAttribute('foo', 'bar') +bool = wrapper.attributes().foo === 'bar' bool = wrapper.hasClass('foo-class') bool = wrapper.hasProp('checked', true) +bool = wrapper.props().checked bool = wrapper.hasStyle('color', 'red') bool = wrapper.is(normalOptions)