有没有办法通过maven / ant运行nodeunittesting
我为nodeunit中的node.js应用程序创build了一些unit testing。 我希望能够通过maven / ant来运行testing,因为我打算通过Jenkins运行它们。 有没有人有这样做的成功?
Maven exec插件可以用来运行Nodeunit和相应的testing。
<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>