🏗✅ Add a presubmit check to help migrate top-level describe tests to describes.{realWin|integration}#24090
🏗✅ Add a presubmit check to help migrate top-level describe tests to describes.{realWin|integration}#24090rsimha merged 1 commit intoampproject:masterfrom rsimha:2019-08-16-TopLevelDescribe
describe tests to describes.{realWin|integration}#24090Conversation
|
Could you explain your overall plan for the refactoring? |
You're correct. The next step is to add a mechanism to
I'm going to leave that decision to test authors. Right now, all we're doing is converting legacy |
describe blocks in describes.realWindescribe blocks in describes.{realWin|integration}
|
@lannka @jridgewell @choumx This PR is now ready for a full review. |
Any idea how would you do that?
This sounds a right thing to do. |
I believe this can be done in |
It might be possible to detect those calls, but I don't see a straightforward way to automatically fix all those global access. That said, we will likely end up fixing tests one by one. If that's the case, I don't see too much value of wrapping those tests in realWin, which in fact makes the tests code a bit more unreadable. To force all new tests to use |
Fair enough. I'll revert the test changes.
Can do. I'll rework this PR to be a presubmit check instead, with a whitelist containing all the files that currently use It's theoretically possible to force anyone who touches a test file to also change |
describe blocks in describes.{realWin|integration}describe tests to describes.{realWin|integration}
|
@lannka Changed this to a presubmit check and whitelisted all existing uses. PTAL. |
This is part of a larger effort to isolate AMP's tests and prevent global state from leaking across tests.
PR Highlights:
describeAddresses #23839 (comment)
Partial fix for #23839
Partial fix for #23837
Partial fix for #15658
Partial fix for #14360