govgate 0.3.1 → 0.3.2
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/index.js +6 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -245,11 +245,15 @@ function patternToRegex(pattern) {
|
|
|
245
245
|
const escaped = pattern.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*");
|
|
246
246
|
return new RegExp(`^${escaped}$`, "i");
|
|
247
247
|
}
|
|
248
|
+
function bareMethodName(name) {
|
|
249
|
+
return name.replace(/\s*\(.*\)$/, "");
|
|
250
|
+
}
|
|
248
251
|
function tagCases(test) {
|
|
249
252
|
const haystack = `${test.name} ${test.classname ?? ""}`;
|
|
250
253
|
const cases = [...haystack.matchAll(TAG_RE)].map((m) => Number(m[1]));
|
|
251
|
-
|
|
252
|
-
|
|
254
|
+
const bare = bareMethodName(test.name);
|
|
255
|
+
if (!/\s/.test(bare)) {
|
|
256
|
+
cases.push(...[...bare.matchAll(METHOD_TAG_RE)].map((m) => Number(m[1])));
|
|
253
257
|
}
|
|
254
258
|
return cases;
|
|
255
259
|
}
|
package/package.json
CHANGED