Skip to content

Instantly share code, notes, and snippets.

@axelnormand
Created July 30, 2018 10:30
Show Gist options
  • Save axelnormand/22474612007f413f6d4ee2bb537c63b3 to your computer and use it in GitHub Desktop.
Save axelnormand/22474612007f413f6d4ee2bb537c63b3 to your computer and use it in GitHub Desktop.
React Native Storybook
import Channel from '@storybook/channels';
/** create mock channel so don't need websocket in jest tests */
export const createMockChannel = () => {
const transport = {
setHandler: () => null,
send: () => null,
};
return new Channel({ transport });
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment