Karma Jasmine – Uncaught TypeError: __webpack_require__(…).context is not a function

I had the same issue. For some reason, in our other app doing angular update automatically deleted some code in test.ts, namely:

   const context = require.context('./', true, /\.spec\.ts$/);
   context.keys().forEach(context);

and the declaration of require above that.

I did that in my other app manually and so far it works.
Maybe someone knows the reason for this change.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)