Answer the question
In order to leave comments, you need to log in
Why does the project need both Karma and Grunt?
There is a JavaScript library.
I was given the task to cover it with tests.
And they said to use Grunt and Karma for this.
I have read the docs. It turns out that Grunt is a type of build system to run different tasks and scripts; and Karma is a test runner system.
That is, both Grunt and Karma are "launchers".
Can anyone explain to me what is the point of using both Grunt and Karma at once?
PS I have already been told that Gulp is already being used instead of Grunt, but this does not change the essence - why are BOTH systems needed?
Answer the question
In order to leave comments, you need to log in
Karma can only launch the browser and feed it a special page. And that's it, even the tests themselves must be written using other libraries. To be honest, I've been in JS for 12 years, but I still don't understand why Karma is needed.
grunt/gulp are general purpose task runners used to organize all processes. Let's say there is a requirement to run the code through linter and unit tests before building, and only then build it. Karma will not help you with this.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question