-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
166
Part of the transition to using es modules for all tests in the jstest corpus includes removing top-level IIFEs and running all tests implicitly in strict mode. This may challenge some assumptions in existing tests, particularly in assuming that:
- variables can be assigned without first declaring them (no-undef)
- variables declared with var are permitted to shadow "global" variables (such as rs, or symbols which are "load"ed into the global scope like isMongos)
As part of my local testing when converting all tests to modules, I enabled a few additional eslint rules and put this patch together. In some cases I have also removed duplicate logic (e.g. reusing FixtureHelpers to determine the fixture type)
- related to
-
SERVER-82621 Shadowing declaration of 'version' in jstest
- Backlog