Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Pass docblock pragmas to TestEnvironment constructor. #8320
This simple PR allows test environments to take advantage of docblock pragmas for test file configuration.
For example, in an E2E test, you may want your environment to know during setup that the test user should be configured a certain way. Since that setup may happen when the environment is constructed and before the tests and test hooks are actually run, there needs to be a way for that configuration to be specified.
The docblock is a great fit for that use-case and fits the "Jest way" of doing things, since it's already used in a similar way internally (for specifying the test environment). While it's possible today for any environment to import
@@ Coverage Diff @@ ## master #8320 +/- ## ======================================= Coverage 62.17% 62.17% ======================================= Files 266 266 Lines 10683 10683 Branches 2597 2598 +1 ======================================= Hits 6642 6642 Misses 3452 3452 Partials 589 589