@quantcdn/edge-conformance 0.0.0-stage → 0.1.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.
@@ -0,0 +1,390 @@
1
+ {
2
+ "cases": [
3
+ {
4
+ "id": "static-css-content-type",
5
+ "description": "A .css file has the text/css content type.",
6
+ "tags": [
7
+ "static"
8
+ ],
9
+ "op": "serveStatic",
10
+ "input": {
11
+ "files": {
12
+ "index.html": "<h1>Home</h1>",
13
+ "about/index.html": "<h1>About</h1>",
14
+ "docs/guide/intro/index.html": "<h1>Intro</h1>",
15
+ "contact.html": "<h1>Contact</h1>",
16
+ "css/site.css": "body { color: #000; }",
17
+ "js/app.js": "console.log(\"app\");",
18
+ "data/items.json": "{\"items\":[]}",
19
+ "img/logo.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>",
20
+ "files/digits.txt": "0123456789",
21
+ "_quant404/index.html": "<h1>Not here</h1>"
22
+ },
23
+ "request": {
24
+ "method": "GET",
25
+ "url": "https://www.example.com/css/site.css"
26
+ }
27
+ },
28
+ "expect": {
29
+ "status": 200,
30
+ "headers": {
31
+ "content-type": {
32
+ "startsWith": "text/css"
33
+ }
34
+ },
35
+ "bodyText": "body { color: #000; }"
36
+ }
37
+ },
38
+ {
39
+ "id": "static-js-content-type",
40
+ "description": "A .js file has a JavaScript content type.",
41
+ "tags": [
42
+ "static"
43
+ ],
44
+ "op": "serveStatic",
45
+ "input": {
46
+ "files": {
47
+ "index.html": "<h1>Home</h1>",
48
+ "about/index.html": "<h1>About</h1>",
49
+ "docs/guide/intro/index.html": "<h1>Intro</h1>",
50
+ "contact.html": "<h1>Contact</h1>",
51
+ "css/site.css": "body { color: #000; }",
52
+ "js/app.js": "console.log(\"app\");",
53
+ "data/items.json": "{\"items\":[]}",
54
+ "img/logo.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>",
55
+ "files/digits.txt": "0123456789",
56
+ "_quant404/index.html": "<h1>Not here</h1>"
57
+ },
58
+ "request": {
59
+ "method": "GET",
60
+ "url": "https://www.example.com/js/app.js"
61
+ }
62
+ },
63
+ "expect": {
64
+ "status": 200,
65
+ "headers": {
66
+ "content-type": {
67
+ "includes": "javascript"
68
+ }
69
+ },
70
+ "bodyText": "console.log(\"app\");"
71
+ }
72
+ },
73
+ {
74
+ "id": "static-json-content-type",
75
+ "description": "A .json file has the application/json content type.",
76
+ "tags": [
77
+ "static"
78
+ ],
79
+ "op": "serveStatic",
80
+ "input": {
81
+ "files": {
82
+ "index.html": "<h1>Home</h1>",
83
+ "about/index.html": "<h1>About</h1>",
84
+ "docs/guide/intro/index.html": "<h1>Intro</h1>",
85
+ "contact.html": "<h1>Contact</h1>",
86
+ "css/site.css": "body { color: #000; }",
87
+ "js/app.js": "console.log(\"app\");",
88
+ "data/items.json": "{\"items\":[]}",
89
+ "img/logo.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>",
90
+ "files/digits.txt": "0123456789",
91
+ "_quant404/index.html": "<h1>Not here</h1>"
92
+ },
93
+ "request": {
94
+ "method": "GET",
95
+ "url": "https://www.example.com/data/items.json"
96
+ }
97
+ },
98
+ "expect": {
99
+ "status": 200,
100
+ "headers": {
101
+ "content-type": {
102
+ "startsWith": "application/json"
103
+ }
104
+ },
105
+ "bodyText": "{\"items\":[]}"
106
+ }
107
+ },
108
+ {
109
+ "id": "static-svg-content-type",
110
+ "description": "A .svg file has the image/svg+xml content type.",
111
+ "tags": [
112
+ "static"
113
+ ],
114
+ "op": "serveStatic",
115
+ "input": {
116
+ "files": {
117
+ "index.html": "<h1>Home</h1>",
118
+ "about/index.html": "<h1>About</h1>",
119
+ "docs/guide/intro/index.html": "<h1>Intro</h1>",
120
+ "contact.html": "<h1>Contact</h1>",
121
+ "css/site.css": "body { color: #000; }",
122
+ "js/app.js": "console.log(\"app\");",
123
+ "data/items.json": "{\"items\":[]}",
124
+ "img/logo.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>",
125
+ "files/digits.txt": "0123456789",
126
+ "_quant404/index.html": "<h1>Not here</h1>"
127
+ },
128
+ "request": {
129
+ "method": "GET",
130
+ "url": "https://www.example.com/img/logo.svg"
131
+ }
132
+ },
133
+ "expect": {
134
+ "status": 200,
135
+ "headers": {
136
+ "content-type": {
137
+ "startsWith": "image/svg+xml"
138
+ }
139
+ }
140
+ }
141
+ },
142
+ {
143
+ "id": "static-text-content-type",
144
+ "description": "A .txt file has the text/plain content type.",
145
+ "tags": [
146
+ "static"
147
+ ],
148
+ "op": "serveStatic",
149
+ "input": {
150
+ "files": {
151
+ "index.html": "<h1>Home</h1>",
152
+ "about/index.html": "<h1>About</h1>",
153
+ "docs/guide/intro/index.html": "<h1>Intro</h1>",
154
+ "contact.html": "<h1>Contact</h1>",
155
+ "css/site.css": "body { color: #000; }",
156
+ "js/app.js": "console.log(\"app\");",
157
+ "data/items.json": "{\"items\":[]}",
158
+ "img/logo.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>",
159
+ "files/digits.txt": "0123456789",
160
+ "_quant404/index.html": "<h1>Not here</h1>"
161
+ },
162
+ "request": {
163
+ "method": "GET",
164
+ "url": "https://www.example.com/files/digits.txt"
165
+ }
166
+ },
167
+ "expect": {
168
+ "status": 200,
169
+ "headers": {
170
+ "content-type": {
171
+ "startsWith": "text/plain"
172
+ }
173
+ },
174
+ "bodyText": "0123456789"
175
+ }
176
+ },
177
+ {
178
+ "id": "static-head-has-no-body",
179
+ "description": "A HEAD request gets the status and headers but no body.",
180
+ "tags": [
181
+ "static"
182
+ ],
183
+ "op": "serveStatic",
184
+ "input": {
185
+ "files": {
186
+ "index.html": "<h1>Home</h1>",
187
+ "about/index.html": "<h1>About</h1>",
188
+ "docs/guide/intro/index.html": "<h1>Intro</h1>",
189
+ "contact.html": "<h1>Contact</h1>",
190
+ "css/site.css": "body { color: #000; }",
191
+ "js/app.js": "console.log(\"app\");",
192
+ "data/items.json": "{\"items\":[]}",
193
+ "img/logo.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>",
194
+ "files/digits.txt": "0123456789",
195
+ "_quant404/index.html": "<h1>Not here</h1>"
196
+ },
197
+ "request": {
198
+ "method": "HEAD",
199
+ "url": "https://www.example.com/about/"
200
+ }
201
+ },
202
+ "expect": {
203
+ "status": 200,
204
+ "headers": {
205
+ "content-type": {
206
+ "startsWith": "text/html"
207
+ }
208
+ },
209
+ "bodyText": ""
210
+ }
211
+ },
212
+ {
213
+ "id": "static-range-request",
214
+ "description": "A byte range request gets 206 and the bytes in the range.",
215
+ "tags": [
216
+ "static"
217
+ ],
218
+ "op": "serveStatic",
219
+ "input": {
220
+ "files": {
221
+ "index.html": "<h1>Home</h1>",
222
+ "about/index.html": "<h1>About</h1>",
223
+ "docs/guide/intro/index.html": "<h1>Intro</h1>",
224
+ "contact.html": "<h1>Contact</h1>",
225
+ "css/site.css": "body { color: #000; }",
226
+ "js/app.js": "console.log(\"app\");",
227
+ "data/items.json": "{\"items\":[]}",
228
+ "img/logo.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>",
229
+ "files/digits.txt": "0123456789",
230
+ "_quant404/index.html": "<h1>Not here</h1>"
231
+ },
232
+ "request": {
233
+ "method": "GET",
234
+ "url": "https://www.example.com/files/digits.txt",
235
+ "headers": {
236
+ "range": "bytes=2-5"
237
+ }
238
+ }
239
+ },
240
+ "expect": {
241
+ "status": 206,
242
+ "headers": {
243
+ "content-range": "bytes 2-5/10"
244
+ },
245
+ "bodyText": "2345"
246
+ }
247
+ },
248
+ {
249
+ "id": "static-range-suffix",
250
+ "description": "A suffix range gets the last bytes of the file.",
251
+ "tags": [
252
+ "static"
253
+ ],
254
+ "op": "serveStatic",
255
+ "input": {
256
+ "files": {
257
+ "index.html": "<h1>Home</h1>",
258
+ "about/index.html": "<h1>About</h1>",
259
+ "docs/guide/intro/index.html": "<h1>Intro</h1>",
260
+ "contact.html": "<h1>Contact</h1>",
261
+ "css/site.css": "body { color: #000; }",
262
+ "js/app.js": "console.log(\"app\");",
263
+ "data/items.json": "{\"items\":[]}",
264
+ "img/logo.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>",
265
+ "files/digits.txt": "0123456789",
266
+ "_quant404/index.html": "<h1>Not here</h1>"
267
+ },
268
+ "request": {
269
+ "method": "GET",
270
+ "url": "https://www.example.com/files/digits.txt",
271
+ "headers": {
272
+ "range": "bytes=-3"
273
+ }
274
+ }
275
+ },
276
+ "expect": {
277
+ "status": 206,
278
+ "headers": {
279
+ "content-range": "bytes 7-9/10"
280
+ },
281
+ "bodyText": "789"
282
+ }
283
+ },
284
+ {
285
+ "id": "static-range-open-end",
286
+ "description": "A range without an end runs to the end of the file.",
287
+ "tags": [
288
+ "static"
289
+ ],
290
+ "op": "serveStatic",
291
+ "input": {
292
+ "files": {
293
+ "index.html": "<h1>Home</h1>",
294
+ "about/index.html": "<h1>About</h1>",
295
+ "docs/guide/intro/index.html": "<h1>Intro</h1>",
296
+ "contact.html": "<h1>Contact</h1>",
297
+ "css/site.css": "body { color: #000; }",
298
+ "js/app.js": "console.log(\"app\");",
299
+ "data/items.json": "{\"items\":[]}",
300
+ "img/logo.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>",
301
+ "files/digits.txt": "0123456789",
302
+ "_quant404/index.html": "<h1>Not here</h1>"
303
+ },
304
+ "request": {
305
+ "method": "GET",
306
+ "url": "https://www.example.com/files/digits.txt",
307
+ "headers": {
308
+ "range": "bytes=7-"
309
+ }
310
+ }
311
+ },
312
+ "expect": {
313
+ "status": 206,
314
+ "headers": {
315
+ "content-range": "bytes 7-9/10"
316
+ },
317
+ "bodyText": "789"
318
+ }
319
+ },
320
+ {
321
+ "id": "static-range-unsatisfiable",
322
+ "description": "A range that starts after the end of the file gets 416.",
323
+ "tags": [
324
+ "static",
325
+ "unverified"
326
+ ],
327
+ "op": "serveStatic",
328
+ "input": {
329
+ "files": {
330
+ "index.html": "<h1>Home</h1>",
331
+ "about/index.html": "<h1>About</h1>",
332
+ "docs/guide/intro/index.html": "<h1>Intro</h1>",
333
+ "contact.html": "<h1>Contact</h1>",
334
+ "css/site.css": "body { color: #000; }",
335
+ "js/app.js": "console.log(\"app\");",
336
+ "data/items.json": "{\"items\":[]}",
337
+ "img/logo.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>",
338
+ "files/digits.txt": "0123456789",
339
+ "_quant404/index.html": "<h1>Not here</h1>"
340
+ },
341
+ "request": {
342
+ "method": "GET",
343
+ "url": "https://www.example.com/files/digits.txt",
344
+ "headers": {
345
+ "range": "bytes=20-30"
346
+ }
347
+ }
348
+ },
349
+ "expect": {
350
+ "status": 416,
351
+ "headers": {
352
+ "content-range": "bytes */10"
353
+ }
354
+ }
355
+ },
356
+ {
357
+ "id": "static-accept-ranges",
358
+ "description": "A static file response says that it accepts byte ranges.",
359
+ "tags": [
360
+ "static",
361
+ "unverified"
362
+ ],
363
+ "op": "serveStatic",
364
+ "input": {
365
+ "files": {
366
+ "index.html": "<h1>Home</h1>",
367
+ "about/index.html": "<h1>About</h1>",
368
+ "docs/guide/intro/index.html": "<h1>Intro</h1>",
369
+ "contact.html": "<h1>Contact</h1>",
370
+ "css/site.css": "body { color: #000; }",
371
+ "js/app.js": "console.log(\"app\");",
372
+ "data/items.json": "{\"items\":[]}",
373
+ "img/logo.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\"></svg>",
374
+ "files/digits.txt": "0123456789",
375
+ "_quant404/index.html": "<h1>Not here</h1>"
376
+ },
377
+ "request": {
378
+ "method": "GET",
379
+ "url": "https://www.example.com/files/digits.txt"
380
+ }
381
+ },
382
+ "expect": {
383
+ "status": 200,
384
+ "headers": {
385
+ "accept-ranges": "bytes"
386
+ }
387
+ }
388
+ }
389
+ ]
390
+ }