You can clone with
No one assigned
Use expect(x) or assert.expect(x) instead.
Why? I think it is much better detach that information from the regular test flow. If you use an expect(x) inside the callback it will be valid for the whole scope isn't it? Is this change going to allow multiple expect or anything like that?
If you use an expect(x) inside the callback it will be valid for the whole scope isn't it?
Yes. The second argument to test() just calls expect( .. ) internally.
expect( .. )
Is this change going to allow multiple expect or anything like that?
So what is the reason for the deprecation if it will be valid for the whole scope in a way or another?
In my point of view the argument works much better than calling expect(x) inside the callback but I want to know why this should be a bad practice.
Calling expect(x) makes the intention explicit.
Tests: Stop using the expected argument in test() calls
First step to deprecating the expected argument. Will warn about bad usage
in 2.0.0 in fully remove in 2.1.0.
Test: Remove expected argument, add note about deprecation
Updated our testsuite to stop using the expected argument. Update API docs to remove the expected argument, along with a note about the deprecation. I've created #501 to actually remove the support for the argument. This ticket now has the 2.0.0 milestone, to add a warning when trying to use the argument.