{"id":24186327,"url":"https://github.com/kanocomputing/kano-web-tester","last_synced_at":"2026-06-09T15:01:52.866Z","repository":{"id":73542868,"uuid":"151630593","full_name":"KanoComputing/kano-web-tester","owner":"KanoComputing","description":"Runs front-end mocha tests using puppeteer","archived":false,"fork":false,"pushed_at":"2019-05-13T15:03:58.000Z","size":227,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-03T01:41:53.308Z","etag":null,"topics":["dev-tools"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KanoComputing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-10-04T20:16:31.000Z","updated_at":"2020-07-25T20:46:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"c97bf30f-d858-4940-9836-2b69ac155426","html_url":"https://github.com/KanoComputing/kano-web-tester","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KanoComputing/kano-web-tester","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KanoComputing%2Fkano-web-tester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KanoComputing%2Fkano-web-tester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KanoComputing%2Fkano-web-tester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KanoComputing%2Fkano-web-tester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KanoComputing","download_url":"https://codeload.github.com/KanoComputing/kano-web-tester/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KanoComputing%2Fkano-web-tester/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34112225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["dev-tools"],"created_at":"2025-01-13T12:35:07.963Z","updated_at":"2026-06-09T15:01:52.838Z","avatar_url":"https://github.com/KanoComputing.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"assets/icon.svg\" width=\"36\"\u003e Web Tester\n\nRuns front-end mocha tests using puppeteer\n\n## Installation\n\nThe web tester should always be installed as a local dependency, and the binary using npm scripts.\n\nThis ensures that the required tools are a dependency of your project\n\nInstall with:\n```\nyarn add --dev @kano/web-tester\n```\n\n## Usage\n\nPlace your test files in a directory e.g. `test`. web-tester wil look for all .js files in a given directory.\n\nRun your tests with either:\n\n```\n# run tests with puppeteer and print the results to the console\nweb-tester run **/*test.js\n\n# Serve a web page that runs the tests\nweb-tester serve **/*test.js\n\n# Generate a coverage report\nweb-tester cover **/*test.js\n```\n\nYou can create a `.web-tester.conf.json` to configure both mocha and puppeteer:\n\n```json\n{\n    \"mocha\": {\n        \"ui\": \"tdd\"\n    },\n    \"puppeteer\": {\n        \"slowMo\": 1000\n    }\n}\n```\n\nIn your package.json add a test script as follow to automate your tests\n\n```json\n{\n    \"scripts\": {\n        \"test-ci\": \"web-tester run ./test -r xunit \u003e test-results.xml\"\n    }\n}\n```\n\n## Options\n\n|Command|Options|\n|---|---|\n|`serve`|`--port`: Specifiy which port to use. Default: `8000`|\n|`run`|`--no-headless`: Run puppeteer in no-headless mode. Displays the browser. Default: `false`|\n| |`--reporter`, `-r`: Sepecify which reporter to use, `spec` or `xunit`. Default: `spec`|\n|`cover`|`--no-headless`: Run puppeteer in no-headless mode. Displays the browser. Default: `false`|\n| |`--reporter`, `-r`: Specify which reporter to use. All istanbul reporters are available. An additional `markdown` reporter is available to generate a markdown summary table. You can add multiple reports. Default: `text-summary`|\n\n## Helpers\n\nThe default assertion library is `assert` from `chai`. You can access it with:\n\n```js\nimport { assert } from '@kano/web-tester/helpers.js';\n\nassert.equal(2, 2);\n```\n\nThe `fixture` helper allows you to prepare HTML Templates, access their elements directly and takes care of adding/removing them from the DOM automatically:\n\n```js\nimport { fixture } from '@kano/web-tester/helpers.js';\n\nconst basic = fixture`\n    \u003cmy-el\u003e\u003c/my-el\u003e\n`;\n\nsuite('my-el', () =\u003e {\n    test('constructor', () =\u003e {\n        // Returns the first element in the fixture.\n        // These will be removed at the end of the test\n        const el1 = basic();\n        const el2 = basic();\n    });\n});\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanocomputing%2Fkano-web-tester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanocomputing%2Fkano-web-tester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanocomputing%2Fkano-web-tester/lists"}