FluidFramework
FluidFramework copied to clipboard
build(test-end-to-end-tests): Add eslint rule to check for incorrect describeCompat pattern
Description
This PR adds an eslint rule to check for incorrect usage of describeCompat
. The following pattern can lead to unexpected/incorrect behavior:
describeCompat("Outer Block", "NoCompat", (getTestObjectProvider, apis) => {
describeCompat("Inner Block", "FullCompat", () => {
// Tests...
});
});
Attempting to use getTestObjectProvider
with this pattern will lead to unexpected behavior. For instance, when running CrossVersion tests, the same API version will be used for both N and N-1.
Reviewer Guidance
- Should this be a lint error or warning? I would suggest error, because it will better catch devs attention, and because you can always add
// eslint-disable-next-line regex/invalid-error
to disable the build error. Additionally, I don't think this pattern is ever something we "want" devs to use. - Suggestions for the error wording