Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const baseUrl = Platform.select({ // Put real IP of your server to run on real device
android: 'http://10.0.2.2:3000',
ios: 'http://127.0.0.1:3000',
});
registerSnapshot(class SnapshotClass extends Snapshot {
static snapshotName = 'AppSnapshot';
renderContent() {
return (
);
}
});
registerSnapshot(class SnapshotClass extends Snapshot {
static snapshotName = 'AppSnapshotWithWrongRefImg';
renderContent() {
return (
);
}
});
registerSnapshot(class SnapshotClass extends Snapshot {
static snapshotName = 'someComponent';
renderContent() {
return (
);
});
registerSnapshot(class SnapshotClass extends Snapshot {
static snapshotName = 'someComponent';
renderContent() {
return (
);
}
});
// Disable warning fot the test
YellowBox.ignoreWarnings(['Warning: WebView has been extracted']);
registerSnapshot(class SnapshotClass extends Snapshot {
static snapshotName = 'WebViewTest';
componentDidMount() {
// override default componentDidMount from Snapshot to delay it
// until WebView is loaded. onLoad from WebView is used
}
renderContent() {
return (
{
this.props.onReady();
}} />
);
static snapshotName = 'longContent';
renderContent() {
return (