Class TestMode

java.lang.Object
ch.njol.skript.test.runner.TestMode

public class TestMode extends Object
Static utilities for Skript's 'test mode'.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
    Enable test development mode.
    static boolean
    If the docs failed due to templates or other exceptions.
    static final boolean
    Determines if test mode is enabled.
    static final boolean
    If Skript should run the gen-docs command.
    static final boolean
    If this test is for JUnits on the server.
    static @Nullable File
    In development mode, file that was last run.
    static final Path
    Path to file where to save results in JSON format.
    static final Path
    Root path for scripts containing tests.
    static final @Nullable String
    Overrides the logging verbosity in the config with the property.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ENABLED

      public static final boolean ENABLED
      Determines if test mode is enabled. In test mode, Skript will not load normal scripts, working with TEST_DIR instead.
    • TEST_DIR

      public static final Path TEST_DIR
      Root path for scripts containing tests. If DEV_MODE is enabled, a command will be available to run them individually or collectively. Otherwise, all tests are run, results are written in JSON format to RESULTS_FILE as in TestResults.
    • DEV_MODE

      public static final boolean DEV_MODE
      Enable test development mode. Skript will allow individual test scripts to be loaded and ran, and prints results to chat or console.
    • GEN_DOCS

      public static final boolean GEN_DOCS
      If Skript should run the gen-docs command.
    • VERBOSITY

      public static final @Nullable String VERBOSITY
      Overrides the logging verbosity in the config with the property.
    • RESULTS_FILE

      public static final Path RESULTS_FILE
      Path to file where to save results in JSON format.
    • JUNIT

      public static final boolean JUNIT
      If this test is for JUnits on the server.
    • lastTestFile

      public static @Nullable File lastTestFile
      In development mode, file that was last run.
    • docsFailed

      public static boolean docsFailed
      If the docs failed due to templates or other exceptions. Only updates if TestMode.GEN_DOCS is set.
  • Constructor Details

    • TestMode

      public TestMode()