| 1 | { |
| 2 | "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | "title": "Options", |
| 4 | "description": "JSON schema for Babel Fixture Test Runner", |
| 5 | "allOf": [ |
| 6 | { "$ref": "#/definitions/TaskOption" }, |
| 7 | { "$ref": "https://json.schemastore.org/babelrc", "$comment": "Todo: switch to our inhouse schema" } |
| 8 | ], |
| 9 | "definitions": { |
| 10 | "OS": { |
| 11 | "type":"string", |
| 12 | "description": "The possible values of `process.platform`. See https://nodejs.org/api/process.html#process_process_platform", |
| 13 | "enum": ["aix", "darwin", "freebsd", "linux", "openbsd", "sunos", "win32"] |
| 14 | }, |
| 15 | "TaskOption": { |
| 16 | "type": "object", |
| 17 | "properties": { |
| 18 | "BABEL_8_BREAKING": { |
| 19 | "description": "Whether this test should run when BABEL_8_BREAKING is enabled", |
| 20 | "type":"boolean" |
| 21 | }, |
| 22 | "ignoreOutput": { |
| 23 | "description": "Whether the test should generate and compare with output.js", |
| 24 | "type": "boolean" |
| 25 | }, |
| 26 | "minNodeVersion": { |
| 27 | "description": "The minimum Node.js version this test should run on", |
| 28 | "type": "string", |
| 29 | "pattern": "^\\d+(\\.\\d+){0,2}$" |
| 30 | }, |
| 31 | "os": { |
| 32 | "description": "The OS this test should run on", |
| 33 | "anyOf": [ |
| 34 | { "type": "array", "items": { "$ref": "#/definitions/OS" } }, |
| 35 | { |
| 36 | "$ref": "#/definitions/OS" |
| 37 | } |
| 38 | ] |
| 39 | }, |
| 40 | "throws": { |
| 41 | "description": "Expected thrown error message", |
| 42 | "type":"string", |
| 43 | "default": "" |
| 44 | }, |
| 45 | "validateLogs": { |
| 46 | "description": "Whether this test should validate the stdout and stderr", |
| 47 | "type":"boolean", |
| 48 | "default": false |
| 49 | } |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | } |