Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/react-native-fantom/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ class Root {
ReactFabric.render(element, this.#surfaceId, null, true);
}

getMountingLogs(): Array<string> {
return NativeFantom.getMountingManagerLogs(this.#surfaceId);
takeMountingManagerLogs(): Array<string> {
return NativeFantom.takeMountingManagerLogs(this.#surfaceId);
}

destroy() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('focus view command', () => {
);
});

const mountingLogs = root.getMountingLogs();
const mountingLogs = root.takeMountingManagerLogs();

expect(mountingLogs.length).toBe(2);
expect(mountingLogs[0]).toBe('create view type: `AndroidTextInput`');
Expand All @@ -62,7 +62,7 @@ describe('focus view command', () => {
root.render(<Component />);
});

const mountingLogs = root.getMountingLogs();
const mountingLogs = root.takeMountingManagerLogs();

expect(mountingLogs.length).toBe(2);
expect(mountingLogs[0]).toBe('create view type: `AndroidTextInput`');
Expand All @@ -89,7 +89,7 @@ describe('focus view command', () => {
root.render(<Component />);
});

const mountingLogs = root.getMountingLogs();
const mountingLogs = root.takeMountingManagerLogs();

expect(mountingLogs.length).toBe(2);
expect(mountingLogs[0]).toBe('create view type: `AndroidTextInput`');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe('Suspense', () => {
);
});

let mountingLogs = root.getMountingLogs();
let mountingLogs = root.takeMountingManagerLogs();

expect(mountingLogs.length).toBe(1);
expect(mountingLogs[0]).toBe(
Expand All @@ -133,7 +133,7 @@ describe('Suspense', () => {
resolveFunction = null;
});

mountingLogs = root.getMountingLogs();
mountingLogs = root.takeMountingManagerLogs();

expect(mountingLogs.length).toBe(1);
expect(mountingLogs[0]).toBe(
Expand All @@ -148,7 +148,7 @@ describe('Suspense', () => {
);
});

mountingLogs = root.getMountingLogs();
mountingLogs = root.takeMountingManagerLogs();

expect(mountingLogs.length).toBe(1);
expect(mountingLogs[0]).toBe(
Expand All @@ -161,7 +161,7 @@ describe('Suspense', () => {
resolveFunction = null;
});

mountingLogs = root.getMountingLogs();
mountingLogs = root.takeMountingManagerLogs();

expect(mountingLogs.length).toBe(1);
expect(mountingLogs[0]).toBe(
Expand All @@ -176,7 +176,7 @@ describe('Suspense', () => {
);
});

mountingLogs = root.getMountingLogs();
mountingLogs = root.takeMountingManagerLogs();

expect(mountingLogs.length).toBe(1);
expect(mountingLogs[0]).toBe(
Expand Down Expand Up @@ -206,7 +206,7 @@ describe('Suspense', () => {
root.render(<App color="green" />);
});

let mountingLogs = root.getMountingLogs();
let mountingLogs = root.takeMountingManagerLogs();

expect(mountingLogs.length).toBe(1);
expect(mountingLogs[0]).toBe(
Expand All @@ -220,7 +220,7 @@ describe('Suspense', () => {
});
});

mountingLogs = root.getMountingLogs();
mountingLogs = root.takeMountingManagerLogs();

// Green square is still mounted. Fallback is not shown to the user.
expect(mountingLogs.length).toBe(0);
Expand All @@ -231,7 +231,7 @@ describe('Suspense', () => {
resolveFunction = null;
});

mountingLogs = root.getMountingLogs();
mountingLogs = root.takeMountingManagerLogs();

expect(mountingLogs.length).toBe(1);
expect(mountingLogs[0]).toBe(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10529,7 +10529,7 @@ interface Spec extends TurboModule {
isUnique?: boolean
) => void;
scrollTo: (shadowNode: mixed, options: ScrollOptions) => void;
getMountingManagerLogs: (surfaceId: number) => Array<string>;
takeMountingManagerLogs: (surfaceId: number) => Array<string>;
flushMessageQueue: () => void;
flushEventQueue: () => void;
validateEmptyMessageQueue: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ interface Spec extends TurboModule {
shadowNode: mixed /* ShadowNode */,
options: ScrollOptions,
) => void;
getMountingManagerLogs: (surfaceId: number) => Array<string>;
takeMountingManagerLogs: (surfaceId: number) => Array<string>;
flushMessageQueue: () => void;
flushEventQueue: () => void;
validateEmptyMessageQueue: () => void;
Expand Down