,
options?: RenderOptions
@@ -252,7 +239,6 @@ export declare const shallow: (
) => { output: React.ReactElement
};
export declare const flushMicrotasksQueue: () => Promise;
export declare const cleanup: () => void;
-export declare const debug: DebugAPI;
export declare const fireEvent: FireEventAPI;
export declare const waitForElement: WaitForElementFunction;
export declare const act: (callback: () => void) => Thenable;
diff --git a/website/docs/API.md b/website/docs/API.md
index 62176f09b..5a7bca6c8 100644
--- a/website/docs/API.md
+++ b/website/docs/API.md
@@ -370,63 +370,6 @@ Use cases for scoped queries include:
- queries scoped to a single item inside a FlatList containing many items
- queries scoped to a single screen in tests involving screen transitions (e.g. with react-navigation)
-## `debug`
-
-- [`Example code`](https://github.com/callstack/react-native-testing-library/blob/master/src/__tests__/debug.test.js)
-
-Log prettified shallowly rendered component or test instance (just like snapshot) to stdout.
-
-```jsx
-import { debug } from 'react-native-testing-library';
-
-debug();
-debug.shallow(); // an alias for `debug`
-```
-
-logs:
-
-```jsx
-
-
-
-```
-
-There's also `debug.deep` that renders deeply to stdout.
-
-```jsx
-import { debug } from 'react-native-testing-library';
-
-debug.deep();
-debug.deep(toJSON(), 'actually debug JSON too'); // useful when Component state changes
-```
-
-logs:
-
-```jsx
-
-
- Press me
-
-
-```
-
-Optionally you can provide a string message as a second argument to `debug`, which will be displayed right after the component.
-
## `flushMicrotasksQueue`
Waits for microtasks queue to flush. Useful if you want to wait for some promises with `async/await`.
diff --git a/website/docs/Migration20.md b/website/docs/Migration20.md
index 6bd994919..d4f69eb58 100644
--- a/website/docs/Migration20.md
+++ b/website/docs/Migration20.md
@@ -5,6 +5,11 @@ title: Migration to 2.0
This guides describes major steps involved in migrating your testing code from using React Native Testing Library version `1.x` to version `2.0`.
+
+## Removed global `debug` function
+
+Global debug function has been removed in favor of `debug()` method returned from `render()` function.
+
## Some `byTestId` queries behavior changes
In version `1.x` `getByTestId` and `queryByTestId` could return non-native elements in tests. This was in contrast with other query functions: `getAllByTestId`, `queryAllByTestId`, `findByTestId` and `findAllByTestId` which returned only elements that would be rendered to native components (e.g. `View`, `Text`, etc).