File tree Expand file tree Collapse file tree 2 files changed +8
-40
lines changed
packages/@headlessui-vue/src/components Expand file tree Collapse file tree 2 files changed +8
-40
lines changed Original file line number Diff line number Diff line change @@ -131,27 +131,11 @@ it('should be possible to update a prop from the parent and it should reflect in
131
131
132
132
await new Promise < void > ( nextTick )
133
133
134
- expect ( format ( container . firstElementChild ) ) . toEqual (
135
- format ( html `
136
- < div >
137
- < div aria-describedby ="headlessui-description-1 ">
138
- < p data-count ="0 " id ="headlessui-description-1 "> I am a description</ p >
139
- < button > +1</ button >
140
- </ div >
141
- </ div >
142
- ` )
143
- )
134
+ let description = container . querySelector ( 'p' ) !
135
+
136
+ expect ( description . dataset . count ) . toEqual ( '0' )
144
137
145
138
await click ( getByText ( '+1' ) )
146
139
147
- expect ( format ( container . firstElementChild ) ) . toEqual (
148
- format ( html `
149
- < div >
150
- < div aria-describedby ="headlessui-description-1 ">
151
- < p data-count ="1 " id ="headlessui-description-1 "> I am a description</ p >
152
- < button > +1</ button >
153
- </ div >
154
- </ div >
155
- ` )
156
- )
140
+ expect ( description . dataset . count ) . toEqual ( '1' )
157
141
} )
Original file line number Diff line number Diff line change @@ -129,27 +129,11 @@ it('should be possible to update a prop from the parent and it should reflect in
129
129
130
130
await new Promise < void > ( nextTick )
131
131
132
- expect ( format ( container . firstElementChild ) ) . toEqual (
133
- format ( html `
134
- < div >
135
- < div aria-labelledby ="headlessui-label-1 ">
136
- < label data-count ="0 " id ="headlessui-label-1 "> I am a label</ label >
137
- < button > +1</ button >
138
- </ div >
139
- </ div >
140
- ` )
141
- )
132
+ let label = container . querySelector ( 'label' ) !
133
+
134
+ expect ( label . dataset . count ) . toEqual ( '0' )
142
135
143
136
await click ( getByText ( '+1' ) )
144
137
145
- expect ( format ( container . firstElementChild ) ) . toEqual (
146
- format ( html `
147
- < div >
148
- < div aria-labelledby ="headlessui-label-1 ">
149
- < label data-count ="1 " id ="headlessui-label-1 "> I am a label</ label >
150
- < button > +1</ button >
151
- </ div >
152
- </ div >
153
- ` )
154
- )
138
+ expect ( label . dataset . count ) . toEqual ( '1' )
155
139
} )
You can’t perform that action at this time.
0 commit comments