(config: UserEventConfig)
| 156 | } |
| 157 | |
| 158 | function createInstance(config: UserEventConfig): UserEventInstance { |
| 159 | const instance = { |
| 160 | config, |
| 161 | } as UserEventInstance; |
| 162 | |
| 163 | // Bind interactions to given User Event instance. |
| 164 | const api = { |
| 165 | press: wrapAndBindImpl(instance, press), |
| 166 | longPress: wrapAndBindImpl(instance, longPress), |
| 167 | type: wrapAndBindImpl(instance, type), |
| 168 | clear: wrapAndBindImpl(instance, clear), |
| 169 | paste: wrapAndBindImpl(instance, paste), |
| 170 | scrollTo: wrapAndBindImpl(instance, scrollTo), |
| 171 | }; |
| 172 | |
| 173 | Object.assign(instance, api); |
| 174 | return instance; |
| 175 | } |
| 176 | |
| 177 | /** |
| 178 | * Wraps user interaction with `wrapAsync` (temporarily disable `act` environment while |
no test coverage detected
searching dependent graphs…