Skip to content

Commit

Permalink
clear more, including transformer caches
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Apr 28, 2020
1 parent 3be4064 commit ecc9aae
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/jest-runtime/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -860,14 +860,27 @@ class Runtime {
this._transitiveShouldMock.clear();
this._virtualMocks.clear();
this._cacheFS.clear();
this._unmockList = undefined;

this._sourceMapRegistry.clear();

this._fileTransforms.clear();
this.jestObjectCaches.clear();
// @ts-ignore
this._scriptTransformer = undefined;

this._v8CoverageResult = [];
this._v8CoverageInstrumenter = undefined;
this._moduleImplementation = undefined;

// @ts-ignore
this._config = undefined;
// @ts-ignore
this._coverageOptions = undefined;
// @ts-ignore
this._environment = undefined;
// @ts-ignore
this._resolver = undefined;
}

private _resolveModule(from: Config.Path, to?: string) {
Expand Down

0 comments on commit ecc9aae

Please sign in to comment.