mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix TypeScript tests
Summary: I fixed the TypeScript definitions for Systrace in https://github.com/facebook/react-native/commit/a0f56adb07dd21ee69ad1942e9d485586f1c3ec0, but I forgot to update the TypeScript tests that were outdated. This diff fixes those tests and CI in OSS. Changelog: [internal] Reviewed By: cipolleschi Differential Revision: D40141920 fbshipit-source-id: f73501450af0be6b0b6f836b9a774abb1fa4f620
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c9e6a6056d
commit
40567c21e9
@@ -614,8 +614,21 @@ const AppStateExample = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const profiledJSONParse = Systrace.measure('JSON', 'parse', JSON.parse);
|
||||
profiledJSONParse('[]');
|
||||
if (Systrace.isEnabled()) {
|
||||
const cookie = Systrace.beginAsyncEvent('async-event');
|
||||
Systrace.endAsyncEvent('async-event', cookie);
|
||||
|
||||
const cookie2 = Systrace.beginAsyncEvent('async-event-2', {foo: '123'});
|
||||
Systrace.endAsyncEvent('async-event-2', cookie2, {bar: '456'});
|
||||
|
||||
Systrace.beginEvent('sync-event');
|
||||
Systrace.endEvent();
|
||||
|
||||
Systrace.beginEvent('sync-event-2', {key: 'value'});
|
||||
Systrace.endEvent({key: 'other-value'});
|
||||
|
||||
Systrace.counterEvent('counter', 123);
|
||||
}
|
||||
|
||||
InteractionManager.runAfterInteractions(() => {
|
||||
// ...
|
||||
|
||||
Reference in New Issue
Block a user