{"id":16957944,"url":"https://github.com/joshnuss/svelte-kit-test-helpers","last_synced_at":"2025-10-25T01:32:29.479Z","repository":{"id":61258832,"uuid":"549607719","full_name":"joshnuss/svelte-kit-test-helpers","owner":"joshnuss","description":"Testing utilities for SvelteKit","archived":false,"fork":false,"pushed_at":"2022-10-11T14:56:04.000Z","size":37,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-17T03:42:26.763Z","etag":null,"topics":["svelte","sveltekit","testing","vitest"],"latest_commit_sha":null,"homepage":"","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/joshnuss.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":"2022-10-11T13:00:32.000Z","updated_at":"2024-12-04T02:24:06.000Z","dependencies_parsed_at":"2022-10-13T19:22:34.424Z","dependency_job_id":null,"html_url":"https://github.com/joshnuss/svelte-kit-test-helpers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joshnuss/svelte-kit-test-helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshnuss%2Fsvelte-kit-test-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshnuss%2Fsvelte-kit-test-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshnuss%2Fsvelte-kit-test-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshnuss%2Fsvelte-kit-test-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshnuss","download_url":"https://codeload.github.com/joshnuss/svelte-kit-test-helpers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshnuss%2Fsvelte-kit-test-helpers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280893651,"owners_count":26409279,"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","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"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":["svelte","sveltekit","testing","vitest"],"created_at":"2024-10-13T22:20:41.306Z","updated_at":"2025-10-25T01:32:29.438Z","avatar_url":"https://github.com/joshnuss.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Test helpers for SvelteKit\n\nProvides helper functions and matchers for testing SvelteKit endpoints.\n\nExtracted from [Sky Cart](https://github.com/joshnuss/sky-cart)\n\n## Request helper\n\nA utility function for testing endpoints:\n\n```javascript\n// test/routes/index.test.js\nimport { request } from 'svelte-kit-test-helpers'\nimport { GET } from 'src/routes/+server.js'\n\ntest('GET /', async () =\u003e {\n  const response = await request(GET)\n\n  expect(response.status).toBe(200)\n})\n```\n\nIt makes it easy to adjust the request by adding `cookies`, `headers`, `params` and `body`:\n\n```javascript\n// test/routes/index.test.js\nimport { request } from 'svelte-kit-test-helpers'\nimport { GET } from 'src/routes/+server.js'\n\ntest('GET /', async () =\u003e {\n  const response = await request(GET, {\n    headers: {\n      authorization: 'secret'\n    },\n    cookies: {\n      accountId: '1234'\n    }\n  })\n\n  expect(response.status).toBe(200)\n})\n```\n\n## Matchers\n\nTODO: add examples\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshnuss%2Fsvelte-kit-test-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshnuss%2Fsvelte-kit-test-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshnuss%2Fsvelte-kit-test-helpers/lists"}