@t0.labs/daxta 1.1.7 → 1.1.8
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/dist/build/build-spec.js +9 -8
- package/package.json +1 -1
- package/assets/readme/demo.html +0 -1896
- package/dist/cli/start.d.ts +0 -13
- package/dist/cli/start.js +0 -103
package/dist/build/build-spec.js
CHANGED
|
@@ -175,8 +175,8 @@ function isSuccessStatus(status) {
|
|
|
175
175
|
return status >= 200 && status < 300;
|
|
176
176
|
}
|
|
177
177
|
/**
|
|
178
|
-
*
|
|
179
|
-
*
|
|
178
|
+
* Each Jest case contributes one example. Keep its final matching request after
|
|
179
|
+
* filtering setup successes/errors, since a case may call the subject route twice.
|
|
180
180
|
*/
|
|
181
181
|
function selectHitsForDocs(hits) {
|
|
182
182
|
const byTest = new Map();
|
|
@@ -193,17 +193,18 @@ function selectHitsForDocs(hits) {
|
|
|
193
193
|
const selected = [...unlabeled];
|
|
194
194
|
for (const group of byTest.values()) {
|
|
195
195
|
const section = (0, catalog_1.parseCaseSection)(group[0]?.test);
|
|
196
|
+
let candidates = group;
|
|
196
197
|
if (section === 'semantic' || section === 'invalid' || section === 'omitted' || section === 'auth') {
|
|
197
198
|
const errors = group.filter((hit) => !isSuccessStatus(hit.status));
|
|
198
|
-
|
|
199
|
-
|
|
199
|
+
if (errors.length)
|
|
200
|
+
candidates = errors;
|
|
200
201
|
}
|
|
201
|
-
if (section === 'positive') {
|
|
202
|
+
else if (section === 'positive') {
|
|
202
203
|
const ok = group.filter((hit) => isSuccessStatus(hit.status));
|
|
203
|
-
|
|
204
|
-
|
|
204
|
+
if (ok.length)
|
|
205
|
+
candidates = ok;
|
|
205
206
|
}
|
|
206
|
-
selected.push(
|
|
207
|
+
selected.push(candidates[candidates.length - 1]);
|
|
207
208
|
}
|
|
208
209
|
return selected;
|
|
209
210
|
}
|