title: Test case are failing randomly with the message - [karma-server]: TypeError: Cannot read property 'range' of undefined
body: <p>I am facing issue in running test cases after the node upgrade from node 14 to node 16. Unfortunately I do not have option to downgrade the node version so I have to find alternative way to resolve. I have tried solution mentioned in this <a href="https://stackoverflow.com/questions/64752689/karma-server-typeerror-cannot-read-property-range-of-undefined-angular-u">post</a>. But none of them are working for me.</p>
  <p>Error - while running test cases with node 16 and Angular 9</p>
  <pre><code>[karma-server]: TypeError: Cannot read property 'range' of undefined
  </code></pre>
  <p>It was working fine with node 14.* versions.</p>
  <p>I am looking for solution where I do not have to downgrade my node version.</p>