Skip to content

Commit bf7a6a1

Browse files
authored
Press is actually sync (#2459)
1 parent 1493474 commit bf7a6a1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/testkit/UniDriver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export interface UniDriver {
66
at(index: number): Promise<UniDriver>;
77
instance(): Promise<any>;
88
getInstanceProps(): Promise<any>;
9-
press(): Promise<any>;
9+
press(): void;
1010
typeText(text: string): Promise<void>;
1111
scrollX(deltaX: number): Promise<void>;
1212
scrollY(deltaY: number): Promise<void>;

src/testkit/drivers/TestingLibraryDriver.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ export class TestingLibraryDriver implements UniDriver {
7676
return _.get(instance, 'props');
7777
}
7878

79-
press = async (): Promise<void> => {
79+
press = (): void => {
8080
if (!this.reactTestInstances) {
8181
throw new NoSelectorException();
8282
}
8383
this.validateExplicitInstance();
8484
this.validateSingleInstance();
85-
await act(() => fireEvent.press(this.reactTestInstances[0]));
85+
fireEvent.press(this.reactTestInstances[0]);
8686
};
8787

8888
typeText = async (text: string): Promise<void> => {

0 commit comments

Comments
 (0)