Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
None
-
Fully Compatible
-
ALL
-
Server Serverless 2023-07-10
Description
In the process of migrating some override methods to modules, I discovered that a number of passthroughs are passing eval as a variable to the global test runner scope instead of evaluating the script in the context of the global scope. For example:
- https://github.com/mongodb/mongo/blob/9aab881aba4e583dd39be5ea7687f1ce3b544323/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough_auth.yml#L146
- https://github.com/mongodb/mongo/blob/9aab881aba4e583dd39be5ea7687f1ce3b544323/buildscripts/resmokeconfig/suites/integration_tests_replset_ssl_auth.yml#L37
This is because strict mode is automatically enabled when async/await or modules are used in a script. These additional rules must be obeyed, and should be fixed in this ticket:
- can't assign to an unknown value (must define it using var or member assignment to globalThis)