@testomatio/reporter 1.1.0-beta.mocha-create.2 → 1.1.0-beta.mocha-create.3

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.
@@ -30,11 +30,11 @@ function MochaReporter(runner, opts) {
30
30
 
31
31
  console.log(chalk.bold.green('✔'), test.fullTitle());
32
32
  const testId = parseTest(test.title);
33
-
33
+
34
34
  client.addTestRun(STATUS.PASSED, {
35
35
  test_id: testId,
36
36
  suite_title: getSuiteTitle(test),
37
- title: test.title,
37
+ title: getTestName(test),
38
38
  code: test.body.toString(),
39
39
  file: getFile(test),
40
40
  time: test.duration,
@@ -46,7 +46,7 @@ function MochaReporter(runner, opts) {
46
46
  console.log('skip: %s', test.fullTitle());
47
47
  const testId = parseTest(test.title);
48
48
  client.addTestRun(STATUS.SKIPPED, {
49
- title: test.title,
49
+ title: getTestName(test),
50
50
  suite_title: getSuiteTitle(test),
51
51
  code: test.body.toString(),
52
52
  file: getFile(test),
@@ -65,7 +65,7 @@ function MochaReporter(runner, opts) {
65
65
  suite_title: getSuiteTitle(test),
66
66
  file: getFile(test),
67
67
  test_id: testId,
68
- title: test.title,
68
+ title: getTestName(test),
69
69
  code: test.body.toString(),
70
70
  time: test.duration,
71
71
  });
@@ -91,4 +91,8 @@ function getSuiteTitle(test, pathArr = []) {
91
91
 
92
92
  function getFile(test) {
93
93
  return test.parent.file?.replace(process.cwd(), '');
94
+ }
95
+
96
+ function getTestName(test) {
97
+ return test.fullTitle();
94
98
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testomatio/reporter",
3
- "version": "1.1.0-beta.mocha-create.2",
3
+ "version": "1.1.0-beta.mocha-create.3",
4
4
  "description": "Testomatio Reporter Client",
5
5
  "main": "./lib/reporter.js",
6
6
  "typings": "typings/index.d.ts",