{"id":21565114,"url":"https://github.com/cfware/fastify-test-helper","last_synced_at":"2025-07-31T06:35:51.957Z","repository":{"id":57101053,"uuid":"172564010","full_name":"cfware/fastify-test-helper","owner":"cfware","description":"Testing helper for @cfware/ava-selenium-manager with fastify","archived":false,"fork":false,"pushed_at":"2023-10-16T01:24:11.000Z","size":64,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T21:47:47.329Z","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/cfware.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":"2019-02-25T18:47:17.000Z","updated_at":"2022-08-13T14:43:53.000Z","dependencies_parsed_at":"2025-01-24T11:43:57.709Z","dependency_job_id":"a89a8154-fd0d-4404-ad75-f0ba26beb5be","html_url":"https://github.com/cfware/fastify-test-helper","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfware%2Ffastify-test-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfware%2Ffastify-test-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfware%2Ffastify-test-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfware%2Ffastify-test-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cfware","download_url":"https://codeload.github.com/cfware/fastify-test-helper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244160055,"owners_count":20408021,"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-24T10:18:28.438Z","updated_at":"2025-03-18T05:17:26.419Z","avatar_url":"https://github.com/cfware.png","language":"JavaScript","readme":"# @cfware/fastify-test-helper [![NPM Version][npm-image]][npm-url]\n\nTesting helper for @cfware/tap-selenium-manager with fastify\n\n## Usage\n\n```js\nimport t from 'libtap';\nimport {testBrowser} from '@cfware/tap-selenium-manager';\nimport {FastifyTestHelper} from '@cfware/fastify-test-helper';\n\ntestBrowser(t, 'firefox', new FastifyTestHelper(), {\n  async 'index.html'(t, selenium) {\n    // Test index.html here\n  }\n});\n```\n\nSee tests in [@cfware/history-state] for a real life usage example.\n\n## new FastifyTestHelper(options)\n\n* `options` - optional settings specific to setup of the fastify daemon.\n\n### options.cwd\n\nSets the current working directory, default `process.cwd()`.\n\n### options.nodeModulesPrefix\n\nThe base path to serve node_modules. Default `/node_modules`.\n\n### options.nodeModulesRoot\n\nSets the local directory to serve under `options.nodeModulesPrefix`.\nDefault to `node_modules` under `options.cwd`.\n\n### options.testsPrefix\n\nThe base path which contains pages to be tested. Default `/`.\n\n### options.testsRoot\n\nPoints to files which should be served under `options.testsPrefix`.\nDefault to `fixtures` under `options.cwd`.\n\n### options.customGetters\n\nThis object is used to register custom GET URL's to a local path.\n\nExample:\n```js\n{\n  customGetters: {\n    '/url.js': 'index.js'\n  }\n}\n```\n\nThis will cause requests to the URL `/url.js` to serve `index.js`.  The\npath of `index.js` is relative to `process.cwd()`, no attempt is made to\nprevent serving parent directories.\n\n### options.babelrc\n\nIgnores any `.babelrc` and `babel.config.js` settings by default.\n\nThe following plugins are enabled by default:\n* [babel-plugin-remove-ungap]\n* [babel-plugin-bare-import-rewrite]\n* [babel-plugin-istanbul]\n* [@babel/plugin-proposal-optional-chaining] (loose mode)\n\nThe following [parser plugins] are enabled by default:\n* objectRestSpread\n* importMeta\n* classProperties\n\nIf `options.babelrc` is provided it replaces the default settings.  Default\noptions can be retrieved from the `defaultBabelRC` named export and merged\nusing `Object.assign` or ES2018 object spread.\n\n\n[npm-image]: https://img.shields.io/npm/v/@cfware/fastify-test-helper.svg\n[npm-url]: https://npmjs.org/package/@cfware/fastify-test-helper\n[@cfware/history-state]: https://github.com/cfware/history-state\n[babel-plugin-remove-ungap]: https://github.com/cfware/babel-plugin-remove-ungap#readme\n[babel-plugin-istanbul]: https://github.com/istanbuljs/babel-plugin-istanbul#readme\n[babel-plugin-bare-import-rewrite]: https://github.com/cfware/babel-plugin-bare-import-rewrite#readme\n[@babel/plugin-proposal-optional-chaining]: https://www.npmjs.com/package/@babel/plugin-proposal-optional-chaining\n[parser plugins]: https://babeljs.io/docs/en/babel-parser#plugins\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfware%2Ffastify-test-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcfware%2Ffastify-test-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfware%2Ffastify-test-helper/lists"}