@tramvai/test-jsdom 2.70.1 → 2.72.3
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/lib/index.es.js +1 -7
- package/lib/index.js +4 -6
- package/lib/raf.es.js +7 -0
- package/lib/raf.js +11 -0
- package/package.json +3 -4
package/lib/index.es.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
requestAnimationFrame(resolve);
|
|
3
|
-
// requestAnimationFrame with legacy timers after PR https://github.com/facebook/jest/pull/11567 works on top setTimeout
|
|
4
|
-
jest.runAllTimers();
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
export { waitRaf };
|
|
1
|
+
export { waitRaf } from './raf.es.js';
|
package/lib/index.js
CHANGED
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
requestAnimationFrame(resolve);
|
|
7
|
-
// requestAnimationFrame with legacy timers after PR https://github.com/facebook/jest/pull/11567 works on top setTimeout
|
|
8
|
-
jest.runAllTimers();
|
|
9
|
-
});
|
|
5
|
+
var raf = require('./raf.js');
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.waitRaf = raf.waitRaf;
|
package/lib/raf.es.js
ADDED
package/lib/raf.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const waitRaf = () => new Promise((resolve) => {
|
|
6
|
+
requestAnimationFrame(resolve);
|
|
7
|
+
// requestAnimationFrame with legacy timers after PR https://github.com/facebook/jest/pull/11567 works on top setTimeout
|
|
8
|
+
jest.runAllTimers();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
exports.waitRaf = waitRaf;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/test-jsdom",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.72.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -13,9 +13,8 @@
|
|
|
13
13
|
"url": "git@github.com:Tinkoff/tramvai.git"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
-
"build": "tramvai-build --
|
|
17
|
-
"watch": "tsc -w"
|
|
18
|
-
"build-for-publish": "true"
|
|
16
|
+
"build": "tramvai-build --forPublish --preserveModules",
|
|
17
|
+
"watch": "tsc -w"
|
|
19
18
|
},
|
|
20
19
|
"dependencies": {
|
|
21
20
|
"tslib": "^2.4.0"
|