Skip to content

Commit

Permalink
Parkin 6.1.1 6efa5ef (#56)
Browse files Browse the repository at this point in the history
* Updating tap to version 6.1.1

* chore: update version
  • Loading branch information
lancetipton committed Sep 1, 2023
1 parent 6efa5ef commit 1f34001
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 80 deletions.
49 changes: 26 additions & 23 deletions .bin/parkin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3466,12 +3466,13 @@ var init_hasTag = __esm({
"src/utils/hasTag.ts"() {
import_jsutils16 = __toESM(require_cjs());
parseTags = (tags) => {
return (0, import_jsutils16.isStr)(tags) ? tags.match(/[@]\w*/g) : (0, import_jsutils16.isArr)(tags) ? tags : import_jsutils16.emptyArr;
const parsed = (0, import_jsutils16.isStr)(tags) ? tags.match(/([@](\w|-)*)/g) : (0, import_jsutils16.isArr)(tags) ? tags : import_jsutils16.emptyArr;
return parsed.filter((tag) => (0, import_jsutils16.isStr)(tag) && tag.startsWith(`@`) && tag.length > 2);
};
hasTag = (itemTags = import_jsutils16.emptyArr, compareTags = import_jsutils16.emptyArr) => {
const iTags = (0, import_jsutils16.isStr)(itemTags) ? parseTags(itemTags) : (0, import_jsutils16.eitherArr)(itemTags, []);
const cTags = (0, import_jsutils16.isStr)(compareTags) ? parseTags(compareTags) : (0, import_jsutils16.eitherArr)(compareTags, []);
return Boolean(cTags.find((cTag) => itemTags.includes(cTag)));
return Boolean(cTags.find((cTag) => iTags.includes(cTag)));
};
}
});
Expand Down Expand Up @@ -14530,11 +14531,13 @@ var init_hooks2 = __esm({
if (!(hooksResults == null ? void 0 : hooksResults.length))
return results;
if (hooksResults == null ? void 0 : hooksResults.length) {
const describeResults = hooksResults.map((result) => {
const joined = { ...describeResult, ...result, failed: true, passed: false };
onSuiteDone(joined);
return joined;
});
const describeResults = await Promise.all(
hooksResults.map(async (result) => {
const joined = { ...describeResult, ...result, failed: true, passed: false };
await onSuiteDone(joined);
return joined;
})
);
results.push(...describeResults);
}
return results;
Expand Down Expand Up @@ -14725,11 +14728,11 @@ var init_loopTests = __esm({
action: "skipped" /* skipped */,
status: "skipped" /* skipped */
};
onSpecStart(skipped);
await onSpecStart(skipped);
results.push(skipped);
continue;
} else
onSpecStart(testResult);
await onSpecStart(testResult);
if (shouldAbort())
break;
const beforeEachResults = await loopHooks({
Expand Down Expand Up @@ -14774,7 +14777,7 @@ var init_loopTests = __esm({
testsFailed = true;
if (exitOnFailed) {
results.push(testResult);
onSpecDone(testResult);
await onSpecDone(testResult);
break;
}
}
Expand All @@ -14794,7 +14797,7 @@ var init_loopTests = __esm({
break;
}
results.push(testResult);
onSpecDone({
await onSpecDone({
...testResult,
action: "end" /* end */
});
Expand Down Expand Up @@ -14842,7 +14845,7 @@ var init_loopDescribes = __esm({
fullName: describe2.description
}
});
onSuiteDone(errorResult);
await onSuiteDone(errorResult);
if (!err.result)
err.result = errorResult;
throw err;
Expand Down Expand Up @@ -14879,15 +14882,15 @@ var init_loopDescribes = __esm({
fullName: describe2.description
});
if (shouldSkipDescribe({ describe: describe2, describeOnly, testOnly })) {
onSuiteStart({
await onSuiteStart({
...describeResult,
skipped: true,
action: "skipped" /* skipped */,
status: "skipped" /* skipped */
});
continue;
} else
onSuiteStart(describeResult);
await onSuiteStart(describeResult);
const beforeResults = await callDescribeHooks({
root,
suiteId,
Expand Down Expand Up @@ -14922,7 +14925,7 @@ var init_loopDescribes = __esm({
}) : describeResult;
if (exitOnFailed && describeResult.failed) {
describeFailed = true;
onSuiteDone(describeResult);
await onSuiteDone(describeResult);
results.push(describeResult);
break;
}
Expand All @@ -14938,7 +14941,7 @@ var init_loopDescribes = __esm({
}) : describeResult;
if (exitOnFailed && describeResult.failed) {
describeFailed = true;
onSuiteDone(describeResult);
await onSuiteDone(describeResult);
results.push(describeResult);
break;
}
Expand Down Expand Up @@ -14967,7 +14970,7 @@ var init_loopDescribes = __esm({
}
if (shouldAbort())
break;
onSuiteDone(describeResult);
await onSuiteDone(describeResult);
results.push(describeResult);
}
return shouldAbort() ? { describes: [], failed: describeFailed } : { describes: results, failed: describeFailed };
Expand Down Expand Up @@ -15000,7 +15003,7 @@ var init_run = __esm({
fullName: root.description,
testPath: `/${Types.root}`
});
onRunStart({
await onRunStart({
...rootResult,
action: "start" /* start */,
description: `Starting test execution`
Expand All @@ -15011,8 +15014,8 @@ var init_run = __esm({
type: Types.beforeAll
});
if (shouldAbort()) {
onAbort == null ? void 0 : onAbort();
onRunDone({
await (onAbort == null ? void 0 : onAbort());
await onRunDone({
...rootResult,
action: "abort" /* abort */,
description: `Test execution aborted`
Expand All @@ -15027,8 +15030,8 @@ var init_run = __esm({
describes = resp.describes;
describesFailed = resp.failed;
if (shouldAbort()) {
onAbort == null ? void 0 : onAbort();
onRunDone({
await (onAbort == null ? void 0 : onAbort());
await onRunDone({
...rootResult,
action: "abort" /* abort */,
description: `Test execution aborted`
Expand Down Expand Up @@ -15061,7 +15064,7 @@ var init_run = __esm({
type: Types.afterAll
});
(afterAllResult == null ? void 0 : afterAllResult.length) && describes.push(...afterAllResult);
onRunDone({
await onRunDone({
...rootResult,
describes,
failed: describesFailed,
Expand Down
4 changes: 2 additions & 2 deletions .bin/parkin.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions docs/parkin/global.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/parkin/global.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions docs/parkin/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/parkin/index.js.map

Large diffs are not rendered by default.

44 changes: 23 additions & 21 deletions docs/parkin/test/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -11598,11 +11598,13 @@ var callDescribeHooks = async (args) => {
if (!(hooksResults == null ? void 0 : hooksResults.length))
return results;
if (hooksResults == null ? void 0 : hooksResults.length) {
const describeResults = hooksResults.map((result) => {
const joined = { ...describeResult, ...result, failed: true, passed: false };
onSuiteDone(joined);
return joined;
});
const describeResults = await Promise.all(
hooksResults.map(async (result) => {
const joined = { ...describeResult, ...result, failed: true, passed: false };
await onSuiteDone(joined);
return joined;
})
);
results.push(...describeResults);
}
return results;
Expand Down Expand Up @@ -11760,11 +11762,11 @@ var loopTests = async (args) => {
action: "skipped" /* skipped */,
status: "skipped" /* skipped */
};
onSpecStart(skipped);
await onSpecStart(skipped);
results.push(skipped);
continue;
} else
onSpecStart(testResult);
await onSpecStart(testResult);
if (shouldAbort())
break;
const beforeEachResults = await loopHooks({
Expand Down Expand Up @@ -11809,7 +11811,7 @@ var loopTests = async (args) => {
testsFailed = true;
if (exitOnFailed) {
results.push(testResult);
onSpecDone(testResult);
await onSpecDone(testResult);
break;
}
}
Expand All @@ -11829,7 +11831,7 @@ var loopTests = async (args) => {
break;
}
results.push(testResult);
onSpecDone({
await onSpecDone({
...testResult,
action: "end" /* end */
});
Expand Down Expand Up @@ -11867,7 +11869,7 @@ var loopChildren = async (args) => {
fullName: describe.description
}
});
onSuiteDone(errorResult);
await onSuiteDone(errorResult);
if (!err.result)
err.result = errorResult;
throw err;
Expand Down Expand Up @@ -11904,15 +11906,15 @@ var loopDescribes = async (args) => {
fullName: describe.description
});
if (shouldSkipDescribe({ describe, describeOnly, testOnly })) {
onSuiteStart({
await onSuiteStart({
...describeResult,
skipped: true,
action: "skipped" /* skipped */,
status: "skipped" /* skipped */
});
continue;
} else
onSuiteStart(describeResult);
await onSuiteStart(describeResult);
const beforeResults = await callDescribeHooks({
root,
suiteId,
Expand Down Expand Up @@ -11947,7 +11949,7 @@ var loopDescribes = async (args) => {
}) : describeResult;
if (exitOnFailed && describeResult.failed) {
describeFailed = true;
onSuiteDone(describeResult);
await onSuiteDone(describeResult);
results.push(describeResult);
break;
}
Expand All @@ -11963,7 +11965,7 @@ var loopDescribes = async (args) => {
}) : describeResult;
if (exitOnFailed && describeResult.failed) {
describeFailed = true;
onSuiteDone(describeResult);
await onSuiteDone(describeResult);
results.push(describeResult);
break;
}
Expand Down Expand Up @@ -11992,7 +11994,7 @@ var loopDescribes = async (args) => {
}
if (shouldAbort())
break;
onSuiteDone(describeResult);
await onSuiteDone(describeResult);
results.push(describeResult);
}
return shouldAbort() ? { describes: [], failed: describeFailed } : { describes: results, failed: describeFailed };
Expand All @@ -12015,7 +12017,7 @@ var run = async (args) => {
fullName: root.description,
testPath: `/${Types.root}`
});
onRunStart({
await onRunStart({
...rootResult,
action: "start" /* start */,
description: `Starting test execution`
Expand All @@ -12026,8 +12028,8 @@ var run = async (args) => {
type: Types.beforeAll
});
if (shouldAbort()) {
onAbort == null ? void 0 : onAbort();
onRunDone({
await (onAbort == null ? void 0 : onAbort());
await onRunDone({
...rootResult,
action: "abort" /* abort */,
description: `Test execution aborted`
Expand All @@ -12042,8 +12044,8 @@ var run = async (args) => {
describes = resp.describes;
describesFailed = resp.failed;
if (shouldAbort()) {
onAbort == null ? void 0 : onAbort();
onRunDone({
await (onAbort == null ? void 0 : onAbort());
await onRunDone({
...rootResult,
action: "abort" /* abort */,
description: `Test execution aborted`
Expand Down Expand Up @@ -12076,7 +12078,7 @@ var run = async (args) => {
type: Types.afterAll
});
(afterAllResult == null ? void 0 : afterAllResult.length) && describes.push(...afterAllResult);
onRunDone({
await onRunDone({
...rootResult,
describes,
failed: describesFailed,
Expand Down
4 changes: 2 additions & 2 deletions docs/parkin/test/global.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 1f34001

Please sign in to comment.