@testream/mocha-reporter 1.2.2 → 1.2.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.
Files changed (2) hide show
  1. package/README.md +33 -7
  2. package/package.json +14 -9
package/README.md CHANGED
@@ -1,8 +1,18 @@
1
- # @testream/mocha-reporter
1
+ # @testream/mocha-reporter: Mocha test reporting for Jira
2
2
 
3
- Bridges Mocha test runs from your codebase into Jira with Testream. Once configured, it uploads results automatically.
3
+ `@testream/mocha-reporter` publishes Node.js Mocha test results from CI/CD to Testream, where failures and run context become durable evidence visible from Jira. Mocha remains the code-first execution source, with no requirement to recreate every automated test as a manual Jira case.
4
4
 
5
- ## Quick Start
5
+ ## What the reporter sends to Testream and Jira
6
+
7
+ - Passed, failed, skipped, and pending Mocha results
8
+ - Failure messages, stack traces, and runtime source snippets
9
+ - Branch, commit, build, environment, and CI metadata
10
+ - Suite changes and trends for Jira work and release reviews
11
+
12
+ This connects Node.js testing feedback to the product and delivery context teams already manage in Jira.
13
+ It is designed for existing Mocha projects rather than a replacement test runner.
14
+
15
+ ## Install and configure
6
16
 
7
17
  ```bash
8
18
  npm install --save-dev @testream/mocha-reporter
@@ -19,8 +29,24 @@ module.exports = {
19
29
  };
20
30
  ```
21
31
 
22
- The reporter also captures the Mocha test body's source text at runtime, so
23
- generated CTRF reports include `snippet` even when explicit line metadata is
24
- not available.
32
+ The reporter captures the Mocha test bodys source text at runtime, so generated CTRF reports include a bounded `snippet` even when explicit line metadata is unavailable.
33
+
34
+ ## Mocha evidence in CI/CD
35
+
36
+ Keep running Mocha with the configuration above and store `TESTREAM_API_KEY` as a protected secret. The reporter publishes completed results from GitHub Actions, GitLab CI/CD, Azure Pipelines, Jenkins, or another command-based CI provider, preserving failure and build context for later inspection.
37
+
38
+ ## Frequently asked questions
39
+
40
+ ### Do we need to recreate automated tests as manual Jira cases?
41
+
42
+ No. Your Mocha suite remains the execution source. Testream publishes its evidence for Jira users without asking the team to maintain duplicate manual cases.
43
+
44
+ ### Are source snippets available without line metadata?
45
+
46
+ Yes. The reporter captures bounded runtime source text from the Mocha test body, providing useful evidence when exact source-line metadata is unavailable.
47
+
48
+ ## Official Testream resources
25
49
 
26
- Need more configuration options? See the full guide at https://docs.testream.app/reporters/mocha.
50
+ - [Mocha Jira integration](https://testream.app/mocha-jira-integration)
51
+ - [Complete Mocha reporter setup guide](https://docs.testream.app/reporters/mocha)
52
+ - [Install Testream – Automated Test Management for Jira](https://marketplace.atlassian.com/3048460704)
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@testream/mocha-reporter",
3
- "version": "1.2.2",
4
- "description": "Mocha reporter to upload test results to Testream",
3
+ "version": "1.2.3",
4
+ "description": "Publish Mocha test results, failures, source snippets, and CI metadata to Testream and Jira.",
5
+ "homepage": "https://testream.app/mocha-jira-integration",
5
6
  "main": "dist/index.js",
6
7
  "types": "dist/index.d.ts",
7
8
  "scripts": {
@@ -20,14 +21,18 @@
20
21
  "url": "git+https://github.com/testream/docs.git"
21
22
  },
22
23
  "keywords": [
24
+ "testream",
23
25
  "mocha",
24
- "reporter",
25
- "testing",
26
- "test-management",
27
- "test-results",
26
+ "mocha-reporter",
27
+ "mocha-jira",
28
+ "nodejs",
28
29
  "jira",
30
+ "test-management",
31
+ "automated-test-management",
32
+ "test-reporting",
33
+ "ci-cd",
29
34
  "ctrf",
30
- "testream"
35
+ "unit-testing"
31
36
  ],
32
37
  "author": "Testream",
33
38
  "license": "SEE LICENSE IN LICENSE",
@@ -49,13 +54,13 @@
49
54
  "devDependencies": {
50
55
  "@jira-test-manager/shared-types": "*",
51
56
  "@types/mocha": "^10.0.0",
52
- "@types/node": "^20.10.6",
57
+ "@types/node": "^25.9.3",
53
58
  "@typescript-eslint/eslint-plugin": "^6.17.0",
54
59
  "@typescript-eslint/parser": "^6.17.0",
55
60
  "@vercel/ncc": "^0.38.1",
56
61
  "eslint": "^8.56.0",
57
62
  "prettier": "^3.1.1",
58
- "typescript": "^5.3.3",
63
+ "typescript": "^6.0.3",
59
64
  "vitest": "^4.1.9"
60
65
  },
61
66
  "engines": {