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.
Files changed (2) hide show
  1. package/dist/index.js +6 -2
  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
- if (!/\s/.test(test.name)) {
252
- cases.push(...[...test.name.matchAll(METHOD_TAG_RE)].map((m) => Number(m[1])));
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "govgate",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Governance gate for releases: report CI test results (JUnit XML) to your testing tool and gate promotion on the outcome.",
5
5
  "license": "MIT",
6
6
  "author": "HatStack",