{"id":22423385,"url":"https://github.com/prantlf/web-optional-dots-reporter","last_synced_at":"2025-03-27T05:40:52.340Z","repository":{"id":160181023,"uuid":"635110847","full_name":"prantlf/web-optional-dots-reporter","owner":"prantlf","description":"A test reporter compatible with @web/test-runner, which can print either dots or test suites and test names ans which supports test coverage.","archived":false,"fork":false,"pushed_at":"2023-05-03T11:39:15.000Z","size":69,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-01T18:47:50.903Z","etag":null,"topics":["dots","reporter","test-reporter","web"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/prantlf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2023-05-02T01:48:13.000Z","updated_at":"2023-05-02T02:21:00.000Z","dependencies_parsed_at":"2023-06-27T03:51:00.463Z","dependency_job_id":null,"html_url":"https://github.com/prantlf/web-optional-dots-reporter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fweb-optional-dots-reporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fweb-optional-dots-reporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fweb-optional-dots-reporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fweb-optional-dots-reporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prantlf","download_url":"https://codeload.github.com/prantlf/web-optional-dots-reporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245791899,"owners_count":20672668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["dots","reporter","test-reporter","web"],"created_at":"2024-12-05T18:10:58.079Z","updated_at":"2025-03-27T05:40:52.321Z","avatar_url":"https://github.com/prantlf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# web-optional-dots-reporter\n\n[![Latest version](https://img.shields.io/npm/v/web-optional-dots-reporter)\n ![Dependency status](https://img.shields.io/librariesio/release/npm/web-optional-dots-reporter)\n](https://www.npmjs.com/package/web-optional-dots-reporter)\n\nA test reporter compatible with [@web/test-runner], which can print either dots or test suites and test names ans which supports test coverage.\n\n## Installation\n\nUsing `npm`:\n\n    npm i -D web-optional-dots-reporter\n\n## Usage\n\nCreate a [configuration file] `web-test-runner.config`, import the reporter and create it:\n\n```js\nimport { optionalDotsReporter } from 'web-optional-dots-reporter';\n\nexport default {\n  reporters: [\n    optionalDotsReporter()\n  ]\n}\n```\n\nThe exported function creates a new test reporter compatible with `@web/test-runner`:\n\n```ts\nfunction optionalDotsReporter(options?): Reporter\n```\n\n## Options\n\nThe function `optionalDotsReporter` expects optionally an object with the following properties:\n\n### `dots`\n\nType: `boolean`\u003cbr\u003e\nDefault: `process.stdout.isTTY`\n\nIf dots should be printed instead ot names of test suites and tests.\n\n### `fileNames`\n\nType: `boolean`\u003cbr\u003e\nDefault: `false`\n\nIf the test file names should be printed alongside the test suite names.\n\n### `reportResults`\n\nType: `boolean`\u003cbr\u003e\nDefault: `true`\n\nIf each test result should be printed before the test summary.\n\n## Examples\n\nSuccessful test run, dots enabled:\n\n    \u003e web-test-runner\n\n    ...........................................................\n\n    Chrome: 47 files, 236 suites, 574 tests, 566 passed, 0 failed, 8 skipped in 4.5s\n\nFailing test run, dots and browser log enabled:\n\n    \u003e web-test-runner\n\n    ....................x.....................................\n\n    🚧 Browser logs on Chrome:\n          Lit is in dev mode. Not recommended for production!\n          See https://lit.dev/msg/dev-mode for more information.\n\n    🚧 404 network requests on Chrome:\n        - testNotExistingImg.svg\n\n    ❌ HolyGrailElement \u003e offers slots\n          AssertionError: unexpected slot \"nav-bottom\": expected false to be true\n          + expected - actual\n\n          -false\n          +true\n\n          at o.\u003canonymous\u003e (src/components/holy-grail/holy-grail.test.js:24:78)\n\n    Chrome: 47 files, 236 suites, 574 tests, 565 passed, 1 failed, 8 skipped in 5.0s\n\nFailing test run, dots disabled:\n\n    \u003e web-test-runner\n\n    HolyGrailElement\n      𐄂 offers slots\n      ✓ exposes parts (slot parents)\n      ✓ hides side parts if their slots are empty\n      ✓ shows side parts if their slots are not empty\n\n    ❌ HolyGrailElement \u003e offers slots\n          AssertionError: unexpected slot \"nav-bottom\": expected false to be true\n          + expected - actual\n\n          -false\n          +true\n\n          at o.\u003canonymous\u003e (src/components/holy-grail/holy-grail.test.js:24:78)\n\n    Chrome: 47 files, 236 suites, 574 tests, 566 passed, 0 failed, 8 skipped in 5.6s\n\nFailing test run (insufficient coverage only), dots disabled:\n\n    \u003e web-test-runner\n\n    HolyGrailElement\n      ✓ offers slots\n      ✓ exposes parts (slot parents)\n      ✓ hides side parts if their slots are empty\n      ✓ shows side parts if their slots are not empty\n\n    Coverage for statements (82.64'%) meets global threshold (70%)\n    Coverage for branches (79.92'%) meets global threshold (70%)\n    Coverage for functions (64.66'%) does not meet global threshold (70%)\n    Coverage for lines (82.64'%) meets global threshold (70%)\n\n    Chrome: 47 files, 236 suites, 574 tests, 566 passed, 0 failed, 8 skipped in 5.4s\n\n## Contributing\n\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Lint and test your code.\n\n## License\n\nCopyright (C) 2023 Ferdinand Prantl\n\nLicensed under the [MIT License].\n\n[MIT License]: http://en.wikipedia.org/wiki/MIT_License\n[@web/test-runner]: https://modern-web.dev/docs/test-runner/overview/\n[configuration file]: https://modern-web.dev/docs/test-runner/cli-and-configuration/#configuration-file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fweb-optional-dots-reporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprantlf%2Fweb-optional-dots-reporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fweb-optional-dots-reporter/lists"}