Skip to content

Commit

Permalink
chore: add component that should trigger a render warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjastrzebski committed Oct 22, 2024
1 parent 46e7157 commit d6dae69
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions test-apps/native/src/OtherTest.perf.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const AsyncComponent = () => {
};

jest.setTimeout(600_000);
test('Other Component', async () => {
test('AsyncComponent', async () => {
const scenario = async () => {
const button = screen.getByText('Action');

Expand All @@ -38,7 +38,7 @@ test('Other Component', async () => {
await measureRenders(<AsyncComponent />, { scenario, runs: 10 });
});

test('Other Component 20 run', async () => {
test('AsyncComponent 20 runs', async () => {
const scenario = async () => {
const button = screen.getByText('Action');

Expand All @@ -49,3 +49,14 @@ test('Other Component 20 run', async () => {

await measureRenders(<AsyncComponent />, { scenario, runs: 20 });
});

test('AsyncComponent - no wait', async () => {
const scenario = async () => {
const button = screen.getByText('Action');

fireEvent.press(button);
fireEvent.press(button);
};

await measureRenders(<AsyncComponent />, { scenario });
});

0 comments on commit d6dae69

Please sign in to comment.