Skip to content

Commit cd26fee

Browse files
committed
Add tests
1 parent 70d25c6 commit cd26fee

File tree

5 files changed

+716
-6
lines changed

5 files changed

+716
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"./scripts/jest/environment.js"
108108
],
109109
"setupTestFrameworkScriptFile": "./scripts/jest/test-framework-setup.js",
110-
"testRegex": "/__tests__/",
110+
"testRegex": "/__tests__/.*\\.js$",
111111
"moduleFileExtensions": [
112112
"js",
113113
"json",

src/renderers/shared/fiber/ReactDebugFiberPerf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if (__DEV__) {
4242
// Prefix measurements so that it's possible to filter them.
4343
// Longer prefixes are hard to read in DevTools.
4444
const reactEmoji = '\u269B';
45-
const warningEmoji = '\u26A0\uFE0F';
45+
const warningEmoji = '\uD83D\uDED1';
4646
const supportsUserTiming =
4747
typeof performance !== 'undefined' &&
4848
typeof performance.mark === 'function' &&

src/renderers/shared/fiber/ReactFiberScheduler.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,23 +372,28 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(config : HostConfig<T, P,
372372

373373
function commitAllLifeCycles() {
374374
while (nextEffect !== null) {
375-
if (__DEV__) {
376-
recordEffect();
377-
}
378-
379375
const effectTag = nextEffect.effectTag;
380376

381377
// Use Task priority for lifecycle updates
382378
if (effectTag & (Update | Callback)) {
379+
if (__DEV__) {
380+
recordEffect();
381+
}
383382
const current = nextEffect.alternate;
384383
commitLifeCycles(current, nextEffect);
385384
}
386385

387386
if (effectTag & Ref) {
387+
if (__DEV__) {
388+
recordEffect();
389+
}
388390
commitAttachRef(nextEffect);
389391
}
390392

391393
if (effectTag & Err) {
394+
if (__DEV__) {
395+
recordEffect();
396+
}
392397
commitErrorHandling(nextEffect);
393398
}
394399

@@ -1188,6 +1193,9 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(config : HostConfig<T, P,
11881193
popHostContainer(node);
11891194
break;
11901195
}
1196+
if (__DEV__) {
1197+
stopWorkTimer(node);
1198+
}
11911199
node = node.return;
11921200
}
11931201
}

0 commit comments

Comments
 (0)