{"id":16194303,"url":"https://github.com/vhoyer/lazy-let","last_synced_at":"2025-04-07T15:44:20.725Z","repository":{"id":94762556,"uuid":"526219765","full_name":"vhoyer/lazy-let","owner":"vhoyer","description":"An utility for using lazy variables in a BDD test environment with nested `describe`s, and `it`s.","archived":false,"fork":false,"pushed_at":"2023-04-20T14:52:05.000Z","size":1906,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T15:49:29.193Z","etag":null,"topics":["bdd","hacktoberfest","testing"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/vhoyer.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":"2022-08-18T13:18:43.000Z","updated_at":"2023-04-20T14:09:53.000Z","dependencies_parsed_at":"2023-05-17T16:00:46.190Z","dependency_job_id":null,"html_url":"https://github.com/vhoyer/lazy-let","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vhoyer%2Flazy-let","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vhoyer%2Flazy-let/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vhoyer%2Flazy-let/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vhoyer%2Flazy-let/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vhoyer","download_url":"https://codeload.github.com/vhoyer/lazy-let/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247683537,"owners_count":20978885,"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":["bdd","hacktoberfest","testing"],"created_at":"2024-10-10T08:18:43.174Z","updated_at":"2025-04-07T15:44:20.703Z","avatar_url":"https://github.com/vhoyer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@vhoyer/lazy-let`\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vhoyer/lazy-let/ci.yml?label=ci)](https://github.com/vhoyer/lazy-let)\n[![bundle size](https://img.shields.io/bundlephobia/min/@vhoyer/lazy-let)](https://bundlephobia.com/package/@vhoyer/lazy-let)\n[![npm](https://img.shields.io/npm/dw/@vhoyer/lazy-let?label=npm%20downloads)](https://www.npmjs.com/package/@vhoyer/lazy-let)\n\nAn utility for using lazy variables in a BDD test environment with nested `describe`s, and `it`s.\n\n## Installation\n\n```bash\nnpm install --save-dev @vhoyer/lazy-let\n```\n\n## Usage\n\n```javascript\nimport { describe, it, expect, afterEach } from 'vitest';\nimport { lazylet } from '@vhoyer/lazy-let';\nimport { render } from '@testing-library/vue';\nimport MyFooter from '../my-footer.vue';\n\ndescribe('dummy test', () =\u003e {\n  const $0 = lazylet(afterEach, {\n    value: () =\u003e 1,\n    wrapper: () =\u003e render(MyFooter, {\n      props: $0.props, // defaults to undefined\n    }),\n  });\n\n  it('renders', () =\u003e {\n    expect($0.wrapper.container).toMatchSnapshot();\n  });\n\n  describe('change props', () =\u003e {\n    const $1 = $0(beforeEach, {\n      props: () =\u003e ({ prop: $1.value }),\n      propsAlternative: ($) =\u003e ({ prop: $.value }),\n    });\n\n    it('renders different', () =\u003e {\n      expect($1.wrapper.container).toMatchSnapshot();\n    });\n  });\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvhoyer%2Flazy-let","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvhoyer%2Flazy-let","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvhoyer%2Flazy-let/lists"}