{"id":15553345,"url":"https://github.com/bahmutov/next-state-overwrite-example","last_synced_at":"2025-09-29T00:32:52.846Z","repository":{"id":40440871,"uuid":"386730446","full_name":"bahmutov/next-state-overwrite-example","owner":"bahmutov","description":"Example overwriting NEXT_STATE from a Cypress test","archived":false,"fork":false,"pushed_at":"2023-12-15T14:29:43.000Z","size":368,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T22:38:16.273Z","etag":null,"topics":["cypress-example"],"latest_commit_sha":null,"homepage":"https://glebbahmutov.com/blog/control-nextjs-data-during-tests/","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/bahmutov.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-16T18:31:18.000Z","updated_at":"2021-07-18T13:18:57.000Z","dependencies_parsed_at":"2025-01-18T22:42:35.615Z","dependency_job_id":null,"html_url":"https://github.com/bahmutov/next-state-overwrite-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bahmutov/next-state-overwrite-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fnext-state-overwrite-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fnext-state-overwrite-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fnext-state-overwrite-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fnext-state-overwrite-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bahmutov","download_url":"https://codeload.github.com/bahmutov/next-state-overwrite-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fnext-state-overwrite-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277450939,"owners_count":25819971,"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-09-28T02:00:08.834Z","response_time":79,"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":["cypress-example"],"created_at":"2024-10-02T14:29:45.488Z","updated_at":"2025-09-29T00:32:52.343Z","avatar_url":"https://github.com/bahmutov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# next-state-overwrite-example\n[![ci status][ci image]][ci url] [![badges status][badges image]][badges url] [![next-state-overwrite-example](https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/detailed/onn62n/main\u0026style=flat\u0026logo=cypress)](https://dashboard.cypress.io/projects/onn62n/runs)\n[![renovate-app badge][renovate-badge]][renovate-app] ![cypress version](https://img.shields.io/badge/cypress-7.7.0-brightgreen)\n\u003e Example overwriting Next.js variable NEXT_STATE from a Cypress test\n\nRead the blog post [Control Next.js Server-Side Data During Cypress Tests\n](https://glebbahmutov.com/blog/control-nextjs-data-during-tests/)\n\n![Example test](./images/no-warning.png)\n\nSee [cypress/integration/spec.js](./cypress/integration/spec.js)\n\n## Install and start\n\n```shell\n$ yarn\n$ yarn local\n```\n\nShould start the application and open Cypress test runner\n\n[renovate-badge]: https://img.shields.io/badge/renovate-app-blue.svg\n[renovate-app]: https://renovateapp.com/\n[ci image]: https://github.com/bahmutov/next-state-overwrite-example/workflows/ci/badge.svg?branch=main\n[ci url]: https://github.com/bahmutov/next-state-overwrite-example/actions\n[badges image]: https://github.com/bahmutov/next-state-overwrite-example/workflows/badges/badge.svg?branch=main\n[badges url]: https://github.com/bahmutov/next-state-overwrite-example/actions\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmutov%2Fnext-state-overwrite-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbahmutov%2Fnext-state-overwrite-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmutov%2Fnext-state-overwrite-example/lists"}