Skip to content

Remove debug export from the library #317

Closed
@thymikee

Description

@thymikee

Describe the Feature

There are 2 ways to debug in RNTL at the moment.
The legacy way:

import { debug } from 'react-native-testing-library';
debug(<Component />); // renders shallow by default
debug.deep(<Component />); 

The correct way:

import { render } from 'react-native-testing-library';
const {debug} = render(<Component />); 
debug(); // renders deep by default
debug.shallow();

We'd like to get rid of "the legacy way". It was introduced first and proven to be worse API to the later-introduced "the correct way", which is easier to use – less typing and scoped to the component we're currently testing. It's confusing we have 2 ways to do the same thing, which also have swapped defaults, which is confusing.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions