Type object
File match chutzpah.json
Schema URL https://catalog.lintel.tools/schemas/schemastore/chutzpah-json/latest.json
Source https://www.schemastore.org/chutzpah.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Properties

Framework string

Determines what testing framework to use. This will override the other detection methods.

Values: "qunit" "jasmine" "mocha"
FrameworkVersion string

Tells Chutzpah if it should use a different version of on of the test frameworks than the default one. Currently, the only framework this works for is Jasmine. As of the 3.1.0 release Chutzpah default to Jasmine 2.0 but if you want to use the 1.0 line for Jasmine still pass '1' for FrameworkVersion.

References referenceSettings[]

The references setting allows you to specify which files/folders to use/scan to find references. This is useful since it replaces the need to the ///<reference comments.

The references setting allows you to specify which files/folders to use/scan to find references. This is useful since it replaces the need to the ///<reference comments.

Engine string

The browser engine to use to run the tests. Default is Phantom but JSDOM and Chrome are available. If you choose Chrome you must have an instance of Chrome or Chromium on the machine that Chutzpah can find.

Values: "Phantom" "JSDom" "Chrome"
EngineOptions object

The options to configure the chosen browser engine for Chutzpah to use.

1 nested properties
ChromeBrowserPath string

The path to the chrome/chromium executable on the machine

Server object

Server settings let you enable to configure Chutzpah web server mode.

3 nested properties
Enabled boolean

Determines if the web server mode is enabled.

Default: false
DefaultPort number

The default port to use. If this port is taken Chutzpah will try incrementing until it finds an available one.

RootPath string

The root path of the server. All file paths are relative to this and should be in a directory below or equal to this. Defaults to drive root.

Transforms transformConfig[]

List of transformers to run after testing to generate output files

Compile object

This setting lets you describe in the Chutzpah.json file how to execute a command which can compile your source files to .js files. You tell Chutzpah what to execute and some information about what your executable does (like where to find the generated .js files). Then after running the executable Chutzpah can associate each source file with each output file to still give the nice behavior of mapping tests back to their original files.

11 nested properties
Extensions string[]

The extensions of the files which are getting compiled (e.g. .ts).

ExtensionsWithNoOutput string[]

The extensions of files which take part in compile but have no build output. This is used for cases like TypeScript declaration files which share a .ts extension. They have .d.ts extension and are part of compilation but have no output. You must tell Chutzpah about these if you want the SkipIfUnchanged setting to work. Otherwise Chutzpah will think these are missing output.

The collection of path mapping from source directory/file to output directory/file.

WorkingDirectory string

This is the working directory of the process which executes the command.

Executable string | null

The path to an executable which Chutzpah executes to perform the batch compilation. Chutzpah will try to resolve the path relative to the settings directory. But if can't find the file there you must give it a full path.

Default: null
Arguments string | null

The arguments to pass to the command.

Default: null
Timeout integer

How long to wait for compile to finish in milliseconds?

Default: 30000
SkipIfUnchanged boolean

Skips the execution if all files Chutzpah knows about are older than all of the output files. This is defaulted to true but if you hit issues since it is possible Chutzpah might not know about all the files your compilation is using then you can turn this off. Ideally you should tell Chutzpah about these files using the references and tests settings since this setting helps Chutzpah not need to even invoke the executable if it figures out it's not needed.

Default: true
Mode string

Determines how this compile setting is used. By default it is in Executable mode where it will require you provide an executable which Chutzpah will run if it sees it finds missing .js for input file. If you set this to External then Chutzpah will ignore the Executable, Arguments settings and assume you have some external process which is compiling. In this case Chutzpah will use the SourceDirectory and OutDirectory options to try to find your .js files for the input files. If it can't find them it will trace an error but still attempt to proceed.

Default: "External"
Values: "Executable" "External"
UseSourceMaps boolean

Configures whether .map files should be loaded (if available) to convert under-test JS line numbers to those of their original source files.

Default: false
IgnoreMissingFiles boolean

Should Chutzpah ignore files it expects to find compiled. If set to true Chutzpah will log an error otherwise it will throw

Default: false
TestFileTimeout integer

The time to wait for tests in a file to finish in milliseconds.

TestHarnessLocationMode string

Determines where to place the generated html test harness files. The default mode is TestFileAdjacent which means the harness is placed in the same directory as the test file. SettingsFileAdjacent means it is placed in the same directory as the chutzpah.json file. Custom mode lets you specify a custom path to the directory.

Values: "TestFileAdjacent" "SettingsFileAdjacent" "Custom"
TestHarnessReferenceMode string
Values: "Normal" "AMD"
TestHarnessDirectory string

When TestHarnessLocationMode is set to Custom this is either the relative or absolute path to the directory where to place the test harness.

RootReferencePathMode string

This property determines what directory a rooted reference path refers to.

Default: "DriveRoot"
Values: "DriveRoot" "SettingsFileDirectory"
CodeCoverageTimeout integer

The timeout in milliseconds for how long to wait to instrument each file for code coverage. Defaults to 5000ms.

Default: 5000
CodeCoverageExecutionMode string

If Always, forces code coverage to run always. If Manual/null/not set, allows code coverage to run if invoked using test adapter, command line or context menu options (default). If Never, forces code coverage to never run.

Values: "Manual" "Always" "Never"
CodeCoverageSuccessPercentage number

The percentage of lines needing to be covered to show the coverage output as success or failure. By default this is 60.

CodeCoverageIncludes string[]

The collection code coverage file patterns to include in coverage. These are in glob format. If you specify none all files are included.

CodeCoverageExcludes string[]

The collection code coverage file patterns to exclude in coverage. These are in glob format. If you specify none no files are excluded.

CustomTestHarnessPath string

The CustomTestHarnessPath setting allows you to override the default template Chutzpah uses for the HTML test harness. This is an advanced feature which should only be used as a last resort.

MochaInterface string

The name of the Mocha interface to use. Overrides the default detection mechanism.

Values: "bdd" "tdd" "qunit"
AMDBaseUrl string

Set the baseurl for Chutzpah to use when generating the test harness. Defaults to the test harness directory if not set.

AMDAppDirectory string

Sets the root directory for your AMD paths. This is only needed if your baseUrl is a different location than your source directory. This is common if you are compiling from another language to JavaScript and copying those compiled files to a different folder. For example if you have all your .ts files in /src and you compile them to a /out directory then your AMDBaseUrl is /out and AMDAppDirectory is /src. Defaults to the test harness directory if not set.

UserAgent string

The user agent to use when making web requests

TestPattern string

When Chutzpah reports test results it also tells you what line they are on. The way this is accomplished is by having a regex for each testing framework which describes where to find the names of your tests.

format=regex
EnableTestFileBatching boolean

Determines if batch all test files for this chutzpah.json file should be batched into one test harness. This will often make your test run much faster.

InheritFromParent boolean

Determines if this settings file should inherit and merge with the settings of its parent settings file. The parent is found by recursively walking up the tree.

IgnoreResourceLoadingErrors boolean

Suppress errors that are reported when a script request to load a url (e.g. xhr/script/image) fails.

EnableTracing boolean

Logs tracing information to a log file.

TraceFilePath string

The path to write the trace file to. Defaults tp %temp%/chutzpah.log.

Parallelism number

Max degree of parallelism for running tests. Defaults to number of CPUs

BrowserArguments object

The dictionary of browser name (keys) to corresponding browser arguments (values), i.e.; { 'chrome': '--allow-file-access-from-files' }.

Definitions

engineOptions object

The options to configure the chosen browser engine for Chutzpah to use.

ChromeBrowserPath string

The path to the chrome/chromium executable on the machine

serverSettings object

Server settings let you enable to configure Chutzpah web server mode.

Enabled boolean

Determines if the web server mode is enabled.

Default: false
DefaultPort number

The default port to use. If this port is taken Chutzpah will try incrementing until it finds an available one.

RootPath string

The root path of the server. All file paths are relative to this and should be in a directory below or equal to this. Defaults to drive root.

templateOptions
Mode enum

The way the template is injected into the HTML page.

Default: "Raw"
Values: "Raw" "Script"
Id string

If in script mode what Id to place on the script tag.

Type string

If in script mode what Type to place on script tag

referenceSettings
Path string

The path to either a file or a folder. If given a folder, it will be scanned recursively. This path can be relative to the location of the chutzpah.json file.

Includes string[]

This is an optional array of include glob patterns. Only files matching the Include pattern will be added.

Excludes string[]

This is an optional array of exclude glob patterns. Only files not matching the Exclude patterns will be added.

IncludeInTestHarness boolean

This determines if the reference should be injected into the test harness. When referencing files like .d.ts or files that you plan to load using require.js you should set this to false. Defaults to true.

Default: true
IsTestFrameworkFile boolean

Indicated that this references should be placed directly after the test framework files in the test harness. This ensures that this file is injected into the test harness before almost all other files. Defaults to false.

Default: false
TemplateOptions
3 nested properties
Mode enum

The way the template is injected into the HTML page.

Default: "Raw"
Values: "Raw" "Script"
Id string

If in script mode what Id to place on the script tag.

Type string

If in script mode what Type to place on script tag

compilePathMap
SourcePath string

The source file/directory

OutputPath string

The file/directory that source file/directory is mapped to. Specifying a file OutputPath and a directory for SourcePath indicated the files are being concatenated into one large file

OutputPathType string

The type (file or folder) that the output path refers to. If not specified Chutzpah will try to take a best guess by assuming it is a file if it has a .js extension

Default: "Folder"
Values: "File" "Folder"
testSettings
Path string

The path to either a file or a folder. If given a folder, it will be scanned recursively. This path can be relative to the location of the chutzpah.json file.

Includes string[]

This is an optional array of include glob patterns. Only files matching the Include pattern will be added.

Excludes string[]

This is an optional array of exclude glob patterns. Only files not matching the Exclude patterns will be added.

transformConfig
Name string

The name of the transform to execute

Path string

The file for the transform to save its output to.

compileSettings object

This setting lets you describe in the Chutzpah.json file how to execute a command which can compile your source files to .js files. You tell Chutzpah what to execute and some information about what your executable does (like where to find the generated .js files). Then after running the executable Chutzpah can associate each source file with each output file to still give the nice behavior of mapping tests back to their original files.

Extensions string[]

The extensions of the files which are getting compiled (e.g. .ts).

ExtensionsWithNoOutput string[]

The extensions of files which take part in compile but have no build output. This is used for cases like TypeScript declaration files which share a .ts extension. They have .d.ts extension and are part of compilation but have no output. You must tell Chutzpah about these if you want the SkipIfUnchanged setting to work. Otherwise Chutzpah will think these are missing output.

The collection of path mapping from source directory/file to output directory/file.

WorkingDirectory string

This is the working directory of the process which executes the command.

Executable string | null

The path to an executable which Chutzpah executes to perform the batch compilation. Chutzpah will try to resolve the path relative to the settings directory. But if can't find the file there you must give it a full path.

Default: null
Arguments string | null

The arguments to pass to the command.

Default: null
Timeout integer

How long to wait for compile to finish in milliseconds?

Default: 30000
SkipIfUnchanged boolean

Skips the execution if all files Chutzpah knows about are older than all of the output files. This is defaulted to true but if you hit issues since it is possible Chutzpah might not know about all the files your compilation is using then you can turn this off. Ideally you should tell Chutzpah about these files using the references and tests settings since this setting helps Chutzpah not need to even invoke the executable if it figures out it's not needed.

Default: true
Mode string

Determines how this compile setting is used. By default it is in Executable mode where it will require you provide an executable which Chutzpah will run if it sees it finds missing .js for input file. If you set this to External then Chutzpah will ignore the Executable, Arguments settings and assume you have some external process which is compiling. In this case Chutzpah will use the SourceDirectory and OutDirectory options to try to find your .js files for the input files. If it can't find them it will trace an error but still attempt to proceed.

Default: "External"
Values: "Executable" "External"
UseSourceMaps boolean

Configures whether .map files should be loaded (if available) to convert under-test JS line numbers to those of their original source files.

Default: false
IgnoreMissingFiles boolean

Should Chutzpah ignore files it expects to find compiled. If set to true Chutzpah will log an error otherwise it will throw

Default: false