@jterrazz/test 12.1.0 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -2
- package/dist/checker.js +587 -15
- package/dist/index.d.ts +194 -17
- package/dist/index.js +66 -1145
- package/dist/literate.js +1726 -0
- package/dist/match.js +73 -1
- package/dist/oxlint.cjs +168 -13
- package/dist/oxlint.js +168 -13
- package/dist/queue.js +3 -295
- package/dist/spec-document.js +536 -0
- package/dist/vitest.d.ts +41 -0
- package/dist/vitest.js +69 -0
- package/package.json +10 -4
- package/schema/spec.schema.json +179 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$defs": {
|
|
3
|
+
"fileAssertion": {
|
|
4
|
+
"oneOf": [
|
|
5
|
+
{
|
|
6
|
+
"enum": [
|
|
7
|
+
"absent",
|
|
8
|
+
"exists"
|
|
9
|
+
],
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"minProperties": 1,
|
|
15
|
+
"properties": {
|
|
16
|
+
"contains": {
|
|
17
|
+
"oneOf": [
|
|
18
|
+
{
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"minItems": 1,
|
|
26
|
+
"type": "array"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"equals": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"type": "object"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"run": {
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"properties": {
|
|
41
|
+
"command": {
|
|
42
|
+
"description": "The argv line, run through the shell.",
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"exit": {
|
|
46
|
+
"description": "The exit code the command must return.",
|
|
47
|
+
"type": "integer"
|
|
48
|
+
},
|
|
49
|
+
"files": {
|
|
50
|
+
"additionalProperties": {
|
|
51
|
+
"$ref": "#/$defs/fileAssertion"
|
|
52
|
+
},
|
|
53
|
+
"description": "On-disk assertions, keyed by a path under the working directory.",
|
|
54
|
+
"type": "object"
|
|
55
|
+
},
|
|
56
|
+
"stderr": {
|
|
57
|
+
"description": "Expected stderr, byte-exact. Absent asserts an empty stream.",
|
|
58
|
+
"type": "string"
|
|
59
|
+
},
|
|
60
|
+
"stdin": {
|
|
61
|
+
"description": "Written to the child, then closed.",
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
"stdout": {
|
|
65
|
+
"description": "Expected stdout, byte-exact. Absent asserts an empty stream.",
|
|
66
|
+
"type": "string"
|
|
67
|
+
},
|
|
68
|
+
"timeout": {
|
|
69
|
+
"description": "Milliseconds before the run is killed.",
|
|
70
|
+
"type": "integer"
|
|
71
|
+
},
|
|
72
|
+
"waitFor": {
|
|
73
|
+
"description": "Resolve when this text appears. Only on the last run.",
|
|
74
|
+
"type": "string"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": [
|
|
78
|
+
"command",
|
|
79
|
+
"exit"
|
|
80
|
+
],
|
|
81
|
+
"type": "object"
|
|
82
|
+
},
|
|
83
|
+
"serveEntry": {
|
|
84
|
+
"oneOf": [
|
|
85
|
+
{
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"additionalProperties": {
|
|
90
|
+
"additionalProperties": {
|
|
91
|
+
"type": "string"
|
|
92
|
+
},
|
|
93
|
+
"type": "object"
|
|
94
|
+
},
|
|
95
|
+
"maxProperties": 1,
|
|
96
|
+
"minProperties": 1,
|
|
97
|
+
"type": "object"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"$id": "https://jterrazz.com/schema/jterrazz-test/spec.schema.json",
|
|
103
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"description": "One scenario of the @jterrazz/test literate format: the ground a session stands on, then the session itself.",
|
|
106
|
+
"properties": {
|
|
107
|
+
"description": {
|
|
108
|
+
"description": "The vitest test title — one lowercase line, no trailing period.",
|
|
109
|
+
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
"env": {
|
|
112
|
+
"oneOf": [
|
|
113
|
+
{
|
|
114
|
+
"type": "string"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"items": {
|
|
118
|
+
"type": "string"
|
|
119
|
+
},
|
|
120
|
+
"minItems": 1,
|
|
121
|
+
"type": "array"
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
"description": "A bare word names an env set registered in code; KEY=value is inline. $WORKDIR expands."
|
|
125
|
+
},
|
|
126
|
+
"fixture": {
|
|
127
|
+
"oneOf": [
|
|
128
|
+
{
|
|
129
|
+
"type": "string"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"items": {
|
|
133
|
+
"type": "string"
|
|
134
|
+
},
|
|
135
|
+
"minItems": 1,
|
|
136
|
+
"type": "array"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"description": "Fixture paths copied into the working directory, layering in order."
|
|
140
|
+
},
|
|
141
|
+
"kind": {
|
|
142
|
+
"default": "cli",
|
|
143
|
+
"description": "The facet this document describes.",
|
|
144
|
+
"enum": [
|
|
145
|
+
"cli"
|
|
146
|
+
],
|
|
147
|
+
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
"runs": {
|
|
150
|
+
"description": "The session: one or more runs, sequential, sharing one working directory.",
|
|
151
|
+
"items": {
|
|
152
|
+
"$ref": "#/$defs/run"
|
|
153
|
+
},
|
|
154
|
+
"minItems": 1,
|
|
155
|
+
"type": "array"
|
|
156
|
+
},
|
|
157
|
+
"serve": {
|
|
158
|
+
"description": "Servers registered in code, started once per file.",
|
|
159
|
+
"oneOf": [
|
|
160
|
+
{
|
|
161
|
+
"type": "string"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"items": {
|
|
165
|
+
"$ref": "#/$defs/serveEntry"
|
|
166
|
+
},
|
|
167
|
+
"minItems": 1,
|
|
168
|
+
"type": "array"
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"required": [
|
|
174
|
+
"description",
|
|
175
|
+
"runs"
|
|
176
|
+
],
|
|
177
|
+
"title": "@jterrazz/test spec document",
|
|
178
|
+
"type": "object"
|
|
179
|
+
}
|