1

nodeunit で node.js アプリケーションの単体テストをいくつか作成しました。Jenkins でテストを実行するつもりなので、maven/ant でテストを実行できるようにしたいと考えています。誰かがこれを行うことに成功しましたか?

4

1 に答える 1

1

Maven exec プラグインを使用して、Nodeunit と適切なテストを実行できます。

  <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>
于 2011-08-04T04:21:53.567 に答える