Skip to content

Commit

Permalink
[React Native] Improve logging for missing view configs and invalid v…
Browse files Browse the repository at this point in the history
…iew config getter functions
  • Loading branch information
JoshuaGross committed Sep 25, 2019
1 parent 9942896 commit f15d9dd
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ describe('ReactNativeError', () => {
});

it('should throw error if null component registration getter is used', () => {
let error;
try {
createReactNativeComponentClass('View', null);
} catch (e) {
error = e;
}

expect(error.toString()).toBe('Invariant Violation: View config getter callback must be a function: View (received null)');
try {
createReactNativeComponentClass('View', null)
} catch (e) {
throw new Error(e.toString());
}
}).toThrow('Invariant Violation: View config getter callback must be a function: View (received null)');
});

it('should be able to extract a component stack from a native view', () => {
Expand Down

0 comments on commit f15d9dd

Please sign in to comment.