Skip to content

lib: allow mocking primordials with --expose-internals

This pull request allows swapping primordials when --expose-interals is passed. This is required for libraries like SinonJS to mock Date.

I am not sure why primordials was frozen in the first place since the object is not user-accessible as far as I'm aware.

cc @aduh95 @fatso83

Refs: https://github.com/sinonjs/fake-timers/issues/344 Refs: https://github.com/nodejs/node/pull/36872

Merge request reports

Loading