Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ interface BaseWrapper {
exists (): boolean
visible (): boolean

attributes(): { [name: string]: string } | void
attributes(): { [name: string]: string }
classes(): Array<string> | void
props(): { [name: string]: any } | void
props(): { [name: string]: any }

hasAttribute (attribute: string, value: string): boolean
hasClass (className: string): boolean
Expand Down
2 changes: 2 additions & 0 deletions types/test/wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down