{"id":19664662,"url":"https://github.com/wisersolutions/test-js","last_synced_at":"2025-08-01T22:38:04.687Z","repository":{"id":43127564,"uuid":"150555872","full_name":"WiserSolutions/test-js","owner":"WiserSolutions","description":"Default setup for testing JavaScript/React packages with Jest","archived":false,"fork":false,"pushed_at":"2023-07-18T20:17:37.000Z","size":4820,"stargazers_count":0,"open_issues_count":11,"forks_count":2,"subscribers_count":36,"default_branch":"master","last_synced_at":"2024-04-14T04:48:48.229Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/WiserSolutions.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}},"created_at":"2018-09-27T08:41:40.000Z","updated_at":"2021-05-24T15:03:53.000Z","dependencies_parsed_at":"2024-11-11T16:28:59.111Z","dependency_job_id":null,"html_url":"https://github.com/WiserSolutions/test-js","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WiserSolutions%2Ftest-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WiserSolutions%2Ftest-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WiserSolutions%2Ftest-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WiserSolutions%2Ftest-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WiserSolutions","download_url":"https://codeload.github.com/WiserSolutions/test-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240974381,"owners_count":19887297,"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":[],"created_at":"2024-11-11T16:18:32.349Z","updated_at":"2025-02-27T03:42:55.984Z","avatar_url":"https://github.com/WiserSolutions.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# test-js\n\nDefault setup for testing JavaScript/React packages with Jest\n\n## Use\n\nInstall using\n\n```sh\nnpm install @wisersolutions/test-js\n```\n\nAdd a test script to your `package.json`\n\n```json\n{\n  \"scripts\": {\n    \"test\": \"test-js\"\n  }\n}\n```\n\nor just run it using `npx test-js`. This simply launches `jest` with a default setup tailored\nfor testing packages containing React components - with `enzyme` and `jest-enzyme` to automatically\ninclude `React`, and the render functions in the global scope and add `enzyme-matchers`. Your\ncomponent tests can now be as simple as:\n\n```jsx harmony\ndescribe('Component', () =\u003e {\n  it('renders with defaults', () =\u003e {\n    expect(shallow(\u003cComponent /\u003e)).toMatchSnapshot()\n  })\n})\n```\n\nIf you need to customise the configuration, use `@wisersolutions/test-js/lib/defaultConfig.js` as defaults.\nIf you also need to extend the test framework setup, don't forget to include `@wisersolutions/test-js/lib/setup.js`\nfrom your setup file or simply extend `setupFilesAfterEnv` config instead of replacing it.\n\n## Development\n\n### Install\n\nInstall dependencies using:\n\n```sh\nnpm install\n```\n\n### Develop\n\nAfter you modify sources, run the following (or set up your IDE to do it for you):\n\n- format the code using `npm run format`\n- lint it using `npm run lint`\n- test it using `npm test`\n\nand fix the errors, if there are any.\n\n### Publish\n\nPublishing is done in two steps:\n\n1. Create a new version tag and push it to the repository:\n    ```sh\n    npm version \u003cpatch|minor|major\u003e\n    git push --follow-tags\n    ```\n1. Build and publish the new version as a npm package:\n    ```sh\n    npm publish --access public\n    ``` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwisersolutions%2Ftest-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwisersolutions%2Ftest-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwisersolutions%2Ftest-js/lists"}