Commit f4268c0
refactor: drop lib/host.js, install registry inline in the runner
lib/host.js was a separate module that did one thing: assign
globalThis.codeceptjs = { config, container, event, output, recorder, Helper }.
Imported as a side effect from lib/codecept.js (the runner) and
lib/plugin/browser.js (so the browser-plugin unit test would also get
the registry, since it imports the plugin directly without going through
the runner).
The indirection wasn't earning its keep — and it read like we were
quietly re-introducing the user-facing globals we just deprecated.
- Inline the assignment at the top of lib/codecept.js. The runner is the
one place that should own this; everything that goes through the CLI
hits this module first.
- Drop the import from lib/plugin/browser.js. Plugins shouldn't be
responsible for installing framework registries.
- The browser-plugin unit test bypasses the runner, so it now installs
globalThis.codeceptjs in its setup — same pattern we use in the
@codeceptjs/configure test suite.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 0651205 commit f4268c0
4 files changed
Lines changed: 21 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
36 | 45 | | |
37 | 46 | | |
38 | 47 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
4 | 14 | | |
5 | 15 | | |
6 | 16 | | |
| |||
0 commit comments