{"id":21095456,"url":"https://github.com/faebeee/refactor-insurance","last_synced_at":"2025-12-29T09:11:29.931Z","repository":{"id":57352101,"uuid":"304823882","full_name":"faebeee/refactor-insurance","owner":"faebeee","description":null,"archived":false,"fork":false,"pushed_at":"2020-11-22T16:32:08.000Z","size":393,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-26T21:47:28.443Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/refactor-insurance","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/faebeee.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}},"created_at":"2020-10-17T07:37:02.000Z","updated_at":"2020-11-22T16:32:10.000Z","dependencies_parsed_at":"2022-09-18T07:07:17.561Z","dependency_job_id":null,"html_url":"https://github.com/faebeee/refactor-insurance","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faebeee%2Frefactor-insurance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faebeee%2Frefactor-insurance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faebeee%2Frefactor-insurance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faebeee%2Frefactor-insurance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faebeee","download_url":"https://codeload.github.com/faebeee/refactor-insurance/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243538135,"owners_count":20307104,"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-19T22:26:21.782Z","updated_at":"2025-12-29T09:11:29.881Z","avatar_url":"https://github.com/faebeee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# refactor-insurance\n\nOften during refactoring, stuff breaks and is undetected until production. With `refactor-insurance` you\ncan configure some urls which will be screenshotted. After you've completed your refactoring, rerun the tool to compare\nthe screenshots you've taken before your refactor and compare them with a newly created screenshot. If the images do not \nmatch, you can investigate further. \n\n## Install\n\n    npm i -g refactor-insurance\n    \n## Usage\n\n### `generate`\nGenerate screenshots configured in the config file\n\n    refactor generate ./localhost.js\n    \n   \n### `compare`\n\nCompare generated screenshots with new ones\n    \n    refactor compare ./localhost.js\n    \n    \n## Config\n\nWithin the `auth` object, you can describe how the login should happen. This is useful for sites, which require\nlogin or have a lockdown page. The `auth` object is optional.\n\nIn the `urls` you can pass a list of urls which should be compared\n\n__localhost.js__\n\n```javascript\nexport default [{\n    id: \"test\",\n    url: \"http://localhost:3000\",\n    viewport: [1080, 1024],\n    pages: [\n        {\n            path: '/de',\n            id: 'landingpage',\n            /**\n             * @param {import('puppeteer').Page} page\n             * @returns {Promise\u003cvoid\u003e}\n             */\n            setup: async (page) =\u003e {\n            }\n        },\n        {\n            path: '/de/map-module/participant',\n            id: 'participant-document-groups',\n            /**\n             * @param {import('puppeteer').Page} page\n             * @returns {Promise\u003cvoid\u003e}\n             */\n            setup: async (page) =\u003e {\n            }\n        },\n        {\n            path: '/de/map-module/participant',\n            id: 'participang-map-module',\n            /**\n             * @param {import('puppeteer').Page} page\n             * @returns {Promise\u003cvoid\u003e}\n             */\n            setup: async (page) =\u003e {\n            }\n        }\n    ]\n}]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaebeee%2Frefactor-insurance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaebeee%2Frefactor-insurance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaebeee%2Frefactor-insurance/lists"}