You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
describe("Adder",()=>{it("adds two numbers",()=>{expect(newAdder().add(1,2)).toBe(2);});});
If Adder is renamed, refactoring tools won't generally catch that the string in the test file should also be updated. We'd have to do that manually. ☹️
A solution to this could be to allow taking class/function names instead of the string. On environments that support it, there's a .name property string that can be used directly. On environments that don't (IE!), it can be parsed from the function name.
describe(Adder,()=>{it("adds two numbers",()=>{expect(newAdder().add(1,2)).toBe(2);});});
The text was updated successfully, but these errors were encountered:
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Suppose you have a class under test:
...and a
describe
block of tests:If☹️
Adder
is renamed, refactoring tools won't generally catch that the string in the test file should also be updated. We'd have to do that manually.A solution to this could be to allow taking class/function names instead of the string. On environments that support it, there's a
.name
property string that can be used directly. On environments that don't (IE!), it can be parsed from the function name.The text was updated successfully, but these errors were encountered: