开发者

Is there a way to run nodeunit tests through maven/ant

开发者 https://www.devze.com 2023-03-24 05:54 出处:网络
I have created some unit tests for my node.js application in nodeunit. I want to be able to run the tests through maven / ant, because I intend to run them through Jenkins. Has anyone had 开发者_Stack

I have created some unit tests for my node.js application in nodeunit. I want to be able to run the tests through maven / ant, because I intend to run them through Jenkins. Has anyone had 开发者_StackOverflowany success doing this?


The Maven exec plugin can be used to run Nodeunit and the appropriate tests.

  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <version>1.1.1</version>
    <executions>
      <execution>
        <goals>
          <goal>exec</goal>
        </goals>
      </execution>
    </executions>
    <configuration>
      <executable>nodeunit</executable>
      <workingDirectory>./</workingDirectory>            
      <arguments>
        <argument>tests/node/ServerTests.js</argument>
      </arguments>          
    </configuration>
  </plugin>
0

精彩评论

暂无评论...
验证码 换一张
取 消