Skip to content

Commit b084777

Browse files
committed
finish it off!
1 parent 2c73b95 commit b084777

File tree

7 files changed

+23
-11
lines changed

7 files changed

+23
-11
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ yarn-error.log*
3030
.env.test.local
3131
.env.production.local
3232

33+
# cypress
34+
cypress/screenshots
35+
cypress/videos
36+
3337
# coverage
3438
.nyc_output
39+
coverage
3540
cypress-coverage
41+
jest-coverage

cypress/integration/about.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export {}; // Next.js requires --isolatedModules in tsconfig to be true. Feel free to remove this if you have an import
2+
13
describe('app', () => {
24
it('redirects to /', () => {
35
cy.visit('/about');

cypress/integration/index.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export {}; // Next.js requires --isolatedModules in tsconfig to be true. Feel free to remove this if you have an import
2+
13
describe('landing', () => {
24
it('should render', () => {
35
cy.visitAndWaitFor('/', 'landing_page');

cypress/plugins/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
// This function is called when a project is opened or re-opened (e.g. due to
1414
// the project's config changing)
1515

16+
// @ts-ignore - no @types/@cypress_browserify-preprocessor
17+
import browserify from '@cypress/browserify-preprocessor';
18+
1619
const pluginConfig: Cypress.PluginConfig = (on, config) => {
1720
// `on` is used to hook into various events Cypress emits
1821
// `config` is the resolved Cypress config
1922

20-
const browserify = require('@cypress/browserify-preprocessor');
2123
const options = browserify.defaultOptions;
2224
options.browserifyOptions.transform[1][1].babelrc = true;
2325
options.typescript = require.resolve('typescript');

cypress/support/index.d.ts renamed to cypress/support/custom-commands.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// keep file name different from any TS file within ~/cypress/support so they dont collide on compilation
2+
13
// in cypress/support/index.d.ts
24
// load type definitions that come with Cypress module
35
/// <reference types="cypress" />

cypress/tsconfig.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

tsconfig.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,12 @@
2424
"target": "ES5"
2525
},
2626
"include": ["**/*.ts", "**/*.tsx"],
27-
"exclude": ["node_modules", ".next"]
27+
"exclude": [
28+
"node_modules",
29+
".next",
30+
".nyc_output",
31+
"cypress-coverage",
32+
"coverage",
33+
"jest-coverage"
34+
]
2835
}

0 commit comments

Comments
 (0)