Skip to content

Commit

Permalink
re-add isRunningVisualTests
Browse files Browse the repository at this point in the history
  • Loading branch information
michalziolkowski committed Aug 25, 2024
1 parent a752000 commit 4606cf5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/react-native-storybook/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { default as getStorybook } from './getStorybook';
export { default as isRunningVisualTests } from './isRunningVisualTests';
export { default as openStorybook } from './openStorybook';
export { default as registerStorybook } from './registerStorybook';
7 changes: 7 additions & 0 deletions packages/react-native-storybook/src/isRunningVisualTests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { NativeModules } from 'react-native';

const { SherloModule } = NativeModules;

const isRunningVisualTests = SherloModule?.getConstants().initialMode === 'testing';

export default isRunningVisualTests;

0 comments on commit 4606cf5

Please sign in to comment.