mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
feat: update docs bases on cancelled prepare-2 PR (#335)
* Adapt docs changes from `prepare-2` branch * WIP * Removed unused `printUnsafeWarning` function # Conflicts: # src/helpers/errors.js * Code review changes
This commit is contained in:
committed by
Michał Pierzchała
parent
9fc83fec60
commit
01bc0ee2b4
@@ -39,20 +39,6 @@ export function printDeprecationWarning(functionName: string) {
|
||||
warned[functionName] = true;
|
||||
}
|
||||
|
||||
export function printUnsafeWarning(functionName: string) {
|
||||
if (warned[functionName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
console.warn(`
|
||||
Deprecation Warning:
|
||||
${functionName} is not recommended for use and has been renamed to UNSAFE_${functionName}.
|
||||
In react-native-testing-library 2.x only the UNSAFE_${functionName} name will work.
|
||||
`);
|
||||
|
||||
warned[functionName] = true;
|
||||
}
|
||||
|
||||
export function throwRemovedFunctionError(
|
||||
functionName: string,
|
||||
docsRef: string
|
||||
|
||||
Reference in New Issue
Block a user