* @returns {EXPECTED_ANY} moduleScope
()
| 298 | * @returns {EXPECTED_ANY} moduleScope |
| 299 | */ |
| 300 | createBaseModuleScope() { |
| 301 | const base = { |
| 302 | console, |
| 303 | expect, |
| 304 | jest, |
| 305 | nsObj: (/** @type {EXPECTED_ANY} */ m) => { |
| 306 | Object.defineProperty(m, Symbol.toStringTag, { |
| 307 | value: "Module" |
| 308 | }); |
| 309 | return m; |
| 310 | } |
| 311 | }; |
| 312 | Object.assign(base, this._globalContext); |
| 313 | if (this.jsDom()) { |
| 314 | /** @type {EXPECTED_ANY} */ (base).window = this._globalContext; |
| 315 | /** @type {EXPECTED_ANY} */ (base).self = this._globalContext; |
| 316 | } |
| 317 | return base; |
| 318 | } |
| 319 | |
| 320 | /** |
| 321 | * @returns {EXPECTED_ANY} esm context |