This repository was archived by the owner on Sep 14, 2024. It is now read-only.
This repository was archived by the owner on Sep 14, 2024. It is now read-only.
Remove extraEnvironment as an argument to run #78
Open
Description
Things in extraEnvironment are injected into the globals table for all tests; however, that creates many awkward issues. For example, a test written to expect a certain global can't then be run by a different starter script, and anything required by an extraEnvironment injection will be out of the control of the upcoming monkey patcher.
Instead, additional globals should use the same mechanism as the monkey patcher and should also be a per-test concept. With init.spec.lua, these could easily be injected at the root of a directory tree and any starter script would then pick up the correct environment for all the tests in that tree.