diff options
Diffstat (limited to 'tests/specs/schema.json')
-rw-r--r-- | tests/specs/schema.json | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/tests/specs/schema.json b/tests/specs/schema.json new file mode 100644 index 000000000..8b21ab32c --- /dev/null +++ b/tests/specs/schema.json @@ -0,0 +1,90 @@ +{ + "$id": "https://github.com/denoland/deno/blob/tests/specs/schema.json", + "$schema": "http://json-schema.org/draft-07/schema", + "description": "Schema file for the __test__.jsonc files", + "required": [], + "title": "Deno internal spec test schema", + "type": "object", + "definitions": { + "single_test": { + "type": "object", + "required": ["args", "output"], + "properties": { + "args": { + "default": "", + "oneOf": [{ + "type": "string" + }, { + "type": "array", + "items": { + "type": "string" + } + }] + }, + "cleanDenoDir": { + "type": "boolean" + }, + "cwd": { + "type": "string" + }, + "commandName": { + "type": "string" + }, + "envs": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "output": { + "type": "string" + }, + "exitCode": { + "type": "integer" + } + } + } + }, + "oneOf": [{ + "required": ["steps"], + "properties": { + "tempDir": { + "type": "boolean" + }, + "base": { + "type": "string" + }, + "envs": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/definitions/single_test" + } + } + } + }, { + "allOf": [{ + "properties": { + "tempDir": { + "type": "boolean" + }, + "base": { + "type": "string" + }, + "envs": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, { + "$ref": "#/definitions/single_test" + }] + }] +} |