Skip to content

Commit

Permalink
Merge commit '8f2bcf356' into rn-viewconfig-error-improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaGross committed Sep 24, 2019
2 parents 9942896 + 8f2bcf3 commit 900a6cc
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@ 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)');
expect(() => {
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 900a6cc

Please sign in to comment.