# TASK ## Open Tasks - [ ] Add component Unit-Test example - [ ] Use guide https://docs.cypress.io/guides/component-testing/framework-configuration#Next-js-Webpack-5 - https://www.npmjs.com/package/@cypress/react - https://docs.cypress.io/examples/examples/recipes#Unit-Testing - https://docs.cypress.io/guides/component-testing/introduction#What-is-Component-Testing - Example: https://github.com/cypress-io/cypress/blob/254eb47d91c75a9f56162e7493ab83e5be169935/npm/react/examples/nextjs/cypress/components/Router.spec.jsx - [ ] add testing-library - [ ] add cypress-testing-library https://testing-library.com/docs/cypress-testing-library/intro/ - [ ] add more plugins/settings - https://github.com/cypress-io/cypress/issues/2024#issuecomment-754571301 - [ ] support `__cypress__` in `src/*`? - https://github.com/cypress-io/cypress/issues/1319#issuecomment-596033763 ([example](https://github.com/jrwebdev/typescript-jest-cypress/blob/master/src/example.cy.ts)) - [ ] make sure it works properly with `nextjs` setup - https://github.com/cypress-io/cypress/tree/254eb47d91c75a9f56162e7493ab83e5be169935/npm/react/examples/nextjs - [ ] set up Apollo client and show how to mock (intercept) API requests - [ ] Upgrade Cypress to latest version (7.x, https://docs.cypress.io/guides/references/changelog#7-0-0) - [ ] Optimise TypeScript support https://docs.cypress.io/guides/tooling/typescript-support#Types-for-plugins ## Merged PR - [x] #3 -> TS: make sure `expect` is derived from `jest`'s types in `src/**/__tests__/*` => resolved with https://github.com/natterstefan/nextjs-template/commit/8d7488c057d0a1f3949d05a6aff8f0e3fd2f3219 - [x] #3 -> TS: Fix `cypress/integration/api/probe-status.spec.ts(8,1): error TS1208: 'probe-status.spec.ts' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module.` ==> resolved https://github.com/natterstefan/nextjs-template/commit/8d7488c057d0a1f3949d05a6aff8f0e3fd2f3219#diff-7c73a5b98f30e40574b7149a83a19e335c5ee48b8c9c58e4e6cbfe6a07777037R13 ## noteworthy commits - https://github.com/natterstefan/nextjs-template/pull/3/commits/8d7488c057d0a1f3949d05a6aff8f0e3fd2f3219 (part of #3): enables usage of `jest`'s `expect` next to `cypress`\`s ## Links - <https://github.com/cypress-io/cypress-and-jest-typescript-example>
TASK
Open Tasks
cypress runcypress-io/cypress#2024 (comment)__cypress__insrc/*?nextjssetupMerged PR
expectis derived fromjest's types insrc/**/__tests__/*=> resolved with 8d7488ccypress/integration/api/probe-status.spec.ts(8,1): error TS1208: 'probe-status.spec.ts' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module.==> resolved 8d7488c#diff-7c73a5b98f30e40574b7149a83a19e335c5ee48b8c9c58e4e6cbfe6a07777037R13noteworthy commits
jest'sexpectnext tocypress`sLinks