{"id":13433133,"url":"https://github.com/arcatdmz/nextjs-with-jest-typescript","last_synced_at":"2025-04-12T02:24:32.603Z","repository":{"id":46818539,"uuid":"166431578","full_name":"arcatdmz/nextjs-with-jest-typescript","owner":"arcatdmz","description":"A very simple example of Next.js-based website with Jest tests, all written in TypeScript","archived":false,"fork":false,"pushed_at":"2021-09-23T17:52:58.000Z","size":415,"stargazers_count":75,"open_issues_count":0,"forks_count":28,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T02:24:24.229Z","etag":null,"topics":["css-modules","jest","nextjs","typescript"],"latest_commit_sha":null,"homepage":null,"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/arcatdmz.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}},"created_at":"2019-01-18T15:58:13.000Z","updated_at":"2025-03-27T08:44:36.000Z","dependencies_parsed_at":"2022-09-03T20:34:25.192Z","dependency_job_id":null,"html_url":"https://github.com/arcatdmz/nextjs-with-jest-typescript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcatdmz%2Fnextjs-with-jest-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcatdmz%2Fnextjs-with-jest-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcatdmz%2Fnextjs-with-jest-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcatdmz%2Fnextjs-with-jest-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arcatdmz","download_url":"https://codeload.github.com/arcatdmz/nextjs-with-jest-typescript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248506272,"owners_count":21115408,"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":["css-modules","jest","nextjs","typescript"],"created_at":"2024-07-31T02:01:21.476Z","updated_at":"2025-04-12T02:24:32.583Z","avatar_url":"https://github.com/arcatdmz.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# nextjs-with-jest-typescript\n\nA very simple example of Next.js-based website with Jest tests, all written in TypeScript.\n\n## install\n\n```sh\n$ yarn install\n```\n\n## test\n\n```sh\n$ yarn test\nyarn run v1.22.5\n$ jest\n PASS  __tests__/index.test.tsx\n  With Enzyme\n    √ App shows \"A simple example repo\" in a \u003cp\u003e tag (7 ms)\nTest Suites: 1 passed, 1 total\nTests:       1 passed, 1 total\nSnapshots:   0 total\nTime:        2.893 s, estimated 4 s\nRan all test suites.\nDone in 4.09s.\n```\n\n## code\n\n- `package.json/jest`: use `ts-jest` to test TypeScript files; use mocks for imported CSS/LESS files; use TypeScript compiler to handle both TS/JS files\n- `jest.setup.ts`: use `enzyme` to test with [jQuery-like APIs](https://github.com/airbnb/enzyme#readme)\n- `tsconfig.jest.json`: handles JSX transformation by `ts-jest` during the test\n\n## see also\n\nhttps://github.com/vercel/next.js/tree/master/examples/with-typescript-eslint-jest\n\n- does not use CSS files\n- uses `babel-jest` instead of `ts-jest`\n\n---\n\nhttps://github.com/arcatdmz/nextjs-with-jest-typescript\n\n## Issues\n\n- npm install issue resolved - refer - https://github.com/arcatdmz/nextjs-with-jest-typescript/issues/3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcatdmz%2Fnextjs-with-jest-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farcatdmz%2Fnextjs-with-jest-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcatdmz%2Fnextjs-with-jest-typescript/lists"}