I have an angular module that has some angular configuration that I want all tests to have before running. I could go in all the files and include that module via angular.mock.module
but I was wondering if I could do it via karma somehow.
Asked
Active
Viewed 401 times
1

fur866
- 413
- 1
- 5
- 14
1 Answers
0
make a new file with a suitable name. lets say required.ts
. in this file, include all the required modules/dependencies which you want to include in your tests.
Now in karma.conf
, add the required.ts
in files and preprocess it to get the desired result.
you could also decide to make a require.js
in which case you would not have to preprocess it in karma.conf
.

Divneet
- 648
- 4
- 18