testing-library / testing-library-docs

docs site for @testing-library/*
https://testing-library.com
MIT License
453 stars 709 forks source link

Incorrect documentation for `deferBlockBehavior` #1403

Closed saubaig456 closed 2 months ago

saubaig456 commented 2 months ago

This file: docs/angular-testing-library/api.mdx states that the Angular default for deferBlockBehavior is manual and points to the Angular docs.

However, in the Angular docs the default behavior is Playthrough.

This inconsistency can create confusion when writing tests for defer since manual is the default in the testing library.

MatanBobi commented 2 months ago

Thanks @saubaig456 :) @timdeschryver any chance you can please have a look at this one?

timdeschryver commented 2 months ago

@saubaig456 thanks for catching this. The Angular behavior has been changed after the docs were created for Testing Library.

Do you want to create a pull request to mention that the behavior is different compared to the Angular default?

saubaig456 commented 2 months ago

I can go ahead and do that! In the future would this be something that would be updated in the underlying code to match the Angular default?

I'm assuming we wouldn't do that now since it would break consumers relying on DeferBlockBehavior.Manual as the default

timdeschryver commented 2 months ago

Closed by #1404

@saubaig456 I'll have to think about that. I kind of like the current default. To be close to Angular I assume it would be better to change the behavior. If we do that there will probably also be a way to globally configure the setting.