Skip to content
This repository has been archived by the owner on Sep 14, 2024. It is now read-only.

Remove extraEnvironment as an argument to run #78

Open
MagiMaster opened this issue Apr 28, 2020 · 0 comments
Open

Remove extraEnvironment as an argument to run #78

MagiMaster opened this issue Apr 28, 2020 · 0 comments

Comments

@MagiMaster
Copy link
Collaborator

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants