Skip to content

Commit

Permalink
refactor(zone.js): remove leftover debugging code using Error.stack (
Browse files Browse the repository at this point in the history
…#46989)

Pull request #46672 added some debugging code to trace down the
root cause of its bug, but parts of the debugging code has never
been cleaned up and ended up landing as part of the PR.

This commit removes the code as it might cause unexpected issues.
Likely when e.g. `Error` is patched and would perform XHRs in testing,
unveiling e.g. CORS issues. See #46989.

PR Close #46989
  • Loading branch information
rgant authored and AndrewKushnir committed Aug 1, 2022
1 parent 99e5fa1 commit af4f5df
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions packages/zone.js/lib/jasmine/jasmine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,6 @@ Zone.__load_patch('jasmine', (global: any, Zone: ZoneType, api: _ZonePrivate) =>

if (!isChildOfAmbientZone) throw new Error('Unexpected Zone: ' + Zone.current.name);


Error.stackTraceLimit = Infinity;
let context = new Error().stack;

// This is the zone which will be used for running individual tests.
// It will be a proxy zone, so that the tests function can retroactively install
// different zones.
Expand Down

0 comments on commit af4f5df

Please sign in to comment.