chutzpah.json
Chutzpah configuration file
chutzpah.json
Validate
Check your file against this schema
Opens the validator with this schema already loaded. Paste your
chutzpah.json and it validates in your browser — nothing is uploaded.
Reference
Fields
Generated directly from the schema, following local
$refs, to two levels of nesting.
| Field | Type | Description |
|---|---|---|
Framework | string | Determines what testing framework to use. This will override the other detection methods. one of: "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 |
References | array | 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. |
Tests | array | 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. one of: "Phantom", "JSDom", "Chrome" |
EngineOptions | object | The options to configure the chosen browser engine for Chutzpah to use. |
EngineOptions.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. |
Server.Enabled | boolean | Determines if the web server mode is enabled. default: false |
Server.DefaultPort | number | The default port to use. If this port is taken Chutzpah will try incrementing until it finds an available one. |
Server.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 | array | 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 |
Compile.Extensions | array<string> | The extensions of the files which are getting compiled (e.g. .ts). |
Compile.ExtensionsWithNoOutput | array<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 |
Compile.Paths | array | The collection of path mapping from source directory/file to output directory/file. |
Compile.WorkingDirectory | string | This is the working directory of the process which executes the command. |
Compile.Executable | anyOf | 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 |
Compile.Arguments | anyOf | The arguments to pass to the command. default: null |
Compile.Timeout | integer | How long to wait for compile to finish in milliseconds? default: 30000 |
Compile.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 default: true |
Compile.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 default: "External"one of: "Executable", "External" |
Compile.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 |
Compile.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 one of: "TestFileAdjacent", "SettingsFileAdjac…, "Custom" |
TestHarnessReferenceMode | string | — one of: "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"one of: "DriveRoot", "SettingsFileDirec… |
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. one of: "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 | array<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 | array<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. one of: "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 |
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. |
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' }. |
Audit
What we found in this schema
- Declared draft: draft-07
- Validates cleanly against its own meta-schema.
- 64 properties, 92% carrying a description, max nesting depth 7.
Standards
Specification sections for the keywords in this schema
| Keyword | Document | Section |
|---|---|---|
$id | JSON Schema Core, draft 2020-12 | §8.2.1 — The "$id" Keyword |
$ref | JSON Schema Core, draft 2020-12 | §8.2.3.1 — Direct References with "$ref" |
$schema | JSON Schema Core, draft 2020-12 | §8.1.1 — "$schema" |
additionalProperties | JSON Schema Core, draft 2020-12 | §10.3.2.3 — "additionalProperties" |
anyOf | JSON Schema Core, draft 2020-12 | §10.2.1.2 — "anyOf" |
default | JSON Schema Validation, draft 2020-12 | §9.2 — "default" |
description | JSON Schema Validation, draft 2020-12 | §9.1 — "title" and "description" |
enum | JSON Schema Validation, draft 2020-12 | §6.1.2 — "enum" |
items | JSON Schema Core, draft 2020-12 | §10.3.1.2 — "items" |
properties | JSON Schema Core, draft 2020-12 | §10.3.2.1 — "properties" |
type | JSON Schema Validation, draft 2020-12 | §6.1.1 — "type" |
Documents
- JSON Schema Core, draft 2020-12 — JSON Schema: A Media Type for Describing JSON Documents, A. Wright, H. Andrews, B. Hutton, G. Dennis, Eds., 2022. draft-bhutton-json-schema-01. An expired Internet-Draft with no formal standing in the IETF standards process; it is nonetheless the specification of record for JSON Schema 2020-12, published by json-schema.org.
- JSON Schema Validation, draft 2020-12 — JSON Schema Validation: A Vocabulary for Structural Validation of JSON, A. Wright, H. Andrews, B. Hutton, Eds., 2022.
- RFC 8259 (STD 90) — The JavaScript Object Notation (JSON) Data Interchange Format, T. Bray, Ed., 2017. The format a schema describes.
- RFC 6901 — JavaScript Object Notation (JSON) Pointer. Defines the pointer syntax used by $ref fragments and the ~0 / ~1 escapes.
Source
Attribution
This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.