How can I configure popular JavaScript unit test frameworks to co-operate with Jenkins?

86 Views Asked by At

I want Jenkins to run JavaScript unit tests.

Although I came across different JavaScript unit test frameworks, like Jasmine or Tape, I cannot find any documentation on how to make them work and set-up their output to co-operate with Jenkins.

Can anyone point me to a documentation for Jasmine, Tape and other unit test frameworks, explaining on how to configure them properly to be triggered and evaluated by Jenkins?

1

There are 1 best solutions below

3
On

There is nothing special to do with regards to Jenkins. You need to install the testing libraries as you normally would on the Jenkins executor nodes, and then you can use them as you normally use them from within your Jenkins job. Note that this may mean calling npm install from within your Jenkins job - this is pretty typical; you would do something similar whether you were using Python virtualenv, Ruby bundler, etc.