techhub.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A hub primarily for passionate technologists, but everyone is welcome

Administered by:

Server stats:

4.9K
active users

Doug Parker 🕸️

I feel like I'm going insane today. I just found a global variable in which is apparently _not_ a global? documentation states that the `jest` symbol is _not_ exposed globally and you have to import it, but sometimes it sort-of is?

```
console.log(typeof jest); // object
console.log(jest); // object
console.log(globalThis.jest); // undefined - WTF?!?!
```

Not only that, but `jest` is only defined in certain files and not others, even when one directly imports another.

This kind of behavior should be impossible and I'm completely perplexed. Is this something with `--experimental-vm-modules` or do I need to check myself into a mental hospital?