Skip to content

Commit 1b1215d

Browse files
author
DavertMik
committed
lazy load
1 parent 33b23ee commit 1b1215d

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

test/index.test.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
import { test, describe, beforeEach } from 'node:test'
22
import assert from 'node:assert/strict'
3-
import { config as Config, output, container } from 'codeceptjs'
3+
import codeceptjs, { config as Config, output, container, event } from 'codeceptjs'
4+
5+
// In a real codecept run the framework sets globalThis.codeceptjs from
6+
// lib/host.js so that companion packages can reach back into the runner
7+
// without doing a top-level `import 'codeceptjs'`. Tests don't go through
8+
// the runner, so we register the same handle ourselves.
9+
globalThis.codeceptjs = codeceptjs ?? { config: Config, output, container, event }
10+
411
import {
512
setHeadlessWhen,
613
setHeadedWhen,

0 commit comments

Comments
 (0)