Class NodeunitTask


public class NodeunitTask extends BaseNodeTask<NodeunitTask,NodeunitTaskProperties>
Runs Nodeunit tests.
  • Field Details

    • DEFAULT_NODEUNIT_EXECUTABLE

      public static final String DEFAULT_NODEUNIT_EXECUTABLE
    • DEFAULT_TEST_DIRECTORY

      public static final String DEFAULT_TEST_DIRECTORY
    • DEFAULT_RESULTS_DIRECTORY

      public static final String DEFAULT_RESULTS_DIRECTORY
    • DEFAULT_PARSE_TEST_RESULTS

      public static final boolean DEFAULT_PARSE_TEST_RESULTS
  • Constructor Details

    • NodeunitTask

      public NodeunitTask()
  • Method Details

    • nodeunitExecutable

      public NodeunitTask nodeunitExecutable(@NotNull @NotNull String nodeunitExecutable)
      Specify path to Nodeunit executable for this task. Path must be relative to the working directory.

      Example: node_modules/nodeunit/bin/nodeunit

    • testFilesAndDirectories

      public NodeunitTask testFilesAndDirectories(@NotNull @NotNull String testFilesAndDirectories)
      Specify files and/or directories containing Nodeunit tests. You can specify multiple files and directories separated by a space. Defaults to 'test/' directory.
    • testResultsDirectory

      public NodeunitTask testResultsDirectory(@NotNull @NotNull String testResultsDirectory)
      Name of the directory where the test results will be stored (in JUnit XML format).
    • parseTestResults

      public NodeunitTask parseTestResults(boolean parseTestResults)
      Whether this task should parse test results produced by Nodeunit. Defaults to true. If set to false, a subsequent TestParserTask for TestParserTaskProperties.TestType.JUNIT should be used to gather the results.
    • arguments

      public NodeunitTask arguments(@Nullable @Nullable String arguments)
      Additional command line arguments to pass to Nodeunit. Be aware that some options may already be set by this task configuration.
    • build

      @NotNull protected @NotNull NodeunitTaskProperties build()
      Specified by:
      build in class Task<NodeunitTask,NodeunitTaskProperties>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class BaseNodeTask<NodeunitTask,NodeunitTaskProperties>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BaseNodeTask<NodeunitTask,NodeunitTaskProperties>