{"id":46051405,"url":"https://github.com/buddy/test-collector","last_synced_at":"2026-03-01T09:02:56.157Z","repository":{"id":321613024,"uuid":"1020042588","full_name":"buddy/test-collector","owner":"buddy","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-26T11:36:18.000Z","size":961,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-27T01:09:11.896Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buddy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-15T08:54:02.000Z","updated_at":"2026-01-26T11:36:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"41935a0f-d017-4636-98b3-a532edfdd2fb","html_url":"https://github.com/buddy/test-collector","commit_stats":null,"previous_names":["buddy/test-collector"],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/buddy/test-collector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buddy%2Ftest-collector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buddy%2Ftest-collector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buddy%2Ftest-collector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buddy%2Ftest-collector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buddy","download_url":"https://codeload.github.com/buddy/test-collector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buddy%2Ftest-collector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29965419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T06:55:38.174Z","status":"ssl_error","status_checked_at":"2026-03-01T06:53:04.810Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-01T09:02:55.477Z","updated_at":"2026-03-01T09:02:56.149Z","avatar_url":"https://github.com/buddy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @buddy-works/unit-tests\n\n[![NPM Version](https://img.shields.io/npm/v/%40buddy-works%2Funit-tests?style=plastic)](https://www.npmjs.com/package/@buddy-works/unit-tests)\n\nUniversal test results collector that sends real-time test results from popular JavaScript testing frameworks directly to your Buddy Works unit testing dashboard. Zero configuration required - just install, add to your test config, and go.\n\n**Supported frameworks:** Jest, Jasmine, Mocha, Cypress, Playwright, Vitest\n\n## Installation\n\n```bash\nnpm install --save-dev @buddy-works/unit-tests\n```\n\n## Setup\n\n### 1. Get your token\n\nIn your Buddy Works workspace, go to the **Unit Tests** section and create a new suite. You'll receive a `BUDDY_UT_TOKEN` - set this as an environment variable in your CI/CD pipeline.\n\n### 2. Add to your test configuration\n\nChoose your testing framework and add the reporter:\n\n**Jest** (`jest.config.js`):\n\n```javascript\nmodule.exports = {\n  reporters: ['default', '@buddy-works/unit-tests/jest'],\n}\n```\n\nOr run from CLI:\n\n```bash\njest --reporters=default --reporters=@buddy-works/unit-tests/jest\n```\n\n**Jasmine**:\n\nRun from CLI:\n\n```bash\njasmine --reporter=@buddy-works/unit-tests/jasmine\n```\n\n**Mocha** (`.mocharc.js`):\n\n```javascript\nmodule.exports = {\n  reporter: '@buddy-works/unit-tests/mocha',\n}\n```\n\nOr run from CLI:\n\n```bash\nmocha --reporter=@buddy-works/unit-tests/mocha\n```\n\n**Vitest** (`vitest.config.js`):\n\n```javascript\nimport { defineConfig } from 'vitest/config'\n\nexport default defineConfig({\n  test: {\n    reporters: ['default', '@buddy-works/unit-tests/vitest'],\n  },\n})\n```\n\nOr run from CLI:\n\n```bash\nvitest --reporter=default --reporter=@buddy-works/unit-tests/vitest\n```\n\n**Playwright** (`playwright.config.js`):\n\n```javascript\nimport { defineConfig } from '@playwright/test'\n\nexport default defineConfig({\n  reporter: [['@buddy-works/unit-tests/playwright']],\n})\n```\n\nOr run from CLI:\n\n```bash\nnpx playwright test --reporter=@buddy-works/unit-tests/playwright\n```\n\n**Cypress** (`cypress.config.js`):\n\n```javascript\nconst { defineConfig } = require('cypress')\nconst BuddyCypressReporter = require('@buddy-works/unit-tests/cypress')\n\nmodule.exports = defineConfig({\n  e2e: {\n    reporter: '@buddy-works/unit-tests/dist/reporters/cypress/index.js',\n    setupNodeEvents(on) {\n      on('after:run', BuddyCypressReporter.closeSession)\n    },\n  },\n})\n```\n\nOr run from CLI (still requires the `after:run` hook in config):\n\n```bash\ncypress run --reporter @buddy-works/unit-tests/dist/reporters/cypress/index.js\n```\n\n\u003e **Note for Cypress:**\n\u003e\n\u003e - You must install `mocha` as a dev dependency: `npm install --save-dev mocha`\n\u003e - The `after:run` event handler must be configured in the config file even when using CLI\n\u003e - The reporter path must use the dist path format due to Cypress's module resolution\n\nThat's it! Your tests will now automatically send results to Buddy Works.\n\n\u003e **Note:** These examples show configuration file setups. Some frameworks may support alternative configuration methods (command line options, package.json, etc.). Refer to your testing framework's official documentation for all available configuration options.\n\n## How It Works\n\nThe collector automatically detects your CI/CD environment and gathers all necessary metadata from your pipeline. It creates test sessions, tracks individual test results in real-time, and handles session cleanup automatically.\n\n**Supported CI/CD platforms:**\n\n- **Buddy Works** - Full native support with automatic environment detection\n- **GitHub Actions** - Complete support with workflow integration\n- **Other platforms** - Can be configured manually with environment variables\n\n**Designed for CI/CD:** While it can run locally, it's optimized for CI/CD pipelines where environment variables are automatically available.\n\n## Key Features\n\n- **Zero configuration** - Only requires `BUDDY_UT_TOKEN`\n- **Real-time reporting** - Test results sent as they complete\n- **Automatic session management** - Handles test session lifecycle\n- **Universal support** - Works with all major JavaScript testing frameworks\n- **Multi-platform CI/CD support** - Native support for Buddy Works and GitHub Actions\n- **Smart environment detection** - Automatically detects CI environment and configures accordingly\n\n## Development Testing\n\nTo run the example tests for development and testing purposes:\n\n1. **Install dependencies:**\n\n   ```bash\n   npm i\n   ```\n\n2. **Prepare the package for testing:**\n\n   ```bash\n   npm run prepare:tests\n   ```\n\n3. **Follow individual test instructions:**\n   Each test framework has its own directory under `examples/` with specific setup instructions. Check the README file in each individual test directory for framework-specific instructions.\n\n   Available test frameworks:\n   - `examples/jest/` - Jest testing framework\n   - `examples/jasmine/` - Jasmine testing framework\n   - `examples/mocha/` - Mocha testing framework\n   - `examples/cypress/` - Cypress testing framework\n   - `examples/playwright/` - Playwright testing framework\n   - `examples/vitest/` - Vitest testing framework\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuddy%2Ftest-collector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuddy%2Ftest-collector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuddy%2Ftest-collector/lists"}