Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
rickhanlonii committed Dec 19, 2024
1 parent cfd3bbc commit ef32edd
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ let ReactNative;
let ResponderEventPlugin;
let UIManager;
let createReactNativeComponentClass;
let assertConsoleErrorDev;

// Parallels requireNativeComponent() in that it lazily constructs a view config,
// And registers view manager event types with ReactNativeViewConfigRegistry.
Expand Down Expand Up @@ -69,6 +70,7 @@ beforeEach(() => {
require('react-native/Libraries/ReactPrivate/ReactNativePrivateInterface').RCTEventEmitter;
React = require('react');
act = require('internal-test-utils').act;
assertConsoleErrorDev = require('internal-test-utils').assertConsoleErrorDev;
ReactNative = require('react-native-renderer');
ResponderEventPlugin =
require('react-native-renderer/src/legacy-events/ResponderEventPlugin').default;
Expand Down Expand Up @@ -249,7 +251,10 @@ test('handles events on text nodes', () => {
1,
);
assertConsoleErrorDev([
'ContextHack uses the legacy childContextTypes API which will soon be removed. Use React.createContext() instead.',
'ContextHack uses the legacy childContextTypes API which will soon be removed. ' +
'Use React.createContext() instead. ' +
'(https://react.dev/link/legacy-context)' +
'\n in ContextHack (at **)',
]);

expect(UIManager.createView).toHaveBeenCalledTimes(5);
Expand Down

0 comments on commit ef32edd

Please sign in to comment.