@varlet/ui 2.8.3 → 2.8.4-alpha.1677149602351

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/style.mjs CHANGED
@@ -27,6 +27,7 @@ import './divider/style/index.mjs'
27
27
  import './ellipsis/style/index.mjs'
28
28
  import './form/style/index.mjs'
29
29
  import './form-details/style/index.mjs'
30
+ import './hover/style/index.mjs'
30
31
  import './icon/style/index.mjs'
31
32
  import './image/style/index.mjs'
32
33
  import './image-preview/style/index.mjs'
package/es/utils/jest.mjs CHANGED
@@ -250,4 +250,28 @@ export function mockScrollTo(Element) {
250
250
  this.scrollTop = y;
251
251
  }
252
252
  };
253
+ }
254
+ export function mockUserAgent(userAgent) {
255
+ var originUserAgent = navigator.userAgent;
256
+ Object.defineProperty(window.navigator, 'userAgent', {
257
+ configurable: true,
258
+
259
+ get() {
260
+ return userAgent;
261
+ }
262
+
263
+ });
264
+ return {
265
+ restore() {
266
+ Object.defineProperty(window.navigator, 'userAgent', {
267
+ configurable: true,
268
+
269
+ get() {
270
+ return originUserAgent;
271
+ }
272
+
273
+ });
274
+ }
275
+
276
+ };
253
277
  }