Typescript error when importing from @cypress/skip-test
See original GitHub issueImporting like this
import { onlyOn, skipOn } from '@cypress/skip-test';
Gives me the error:
TS2306: File ‘node_modules/@cypress/skip-test/index.d.ts’ is not a module.
While running tsc --traceResolution
reports the following:
======== Resolving module '@cypress/skip-test' from 'src/pages/EServices/components/GeneralInformation/GeneralInformation.spec.tsx'. ========
Explicitly specified module resolution kind: 'NodeJs'.
'baseUrl' option is set to 'src', using this value to resolve non-relative module name '@cypress/skip-test'.
Resolving module name '@cypress/skip-test' relative to base url 'src' - 'src/@cypress/skip-test'.
Loading module as file / folder, candidate module location 'src/@cypress/skip-test', target file type 'TypeScript'.
Loading module '@cypress/skip-test' from 'node_modules' folder, target file type 'TypeScript'.
Directory 'src/pages/EServices/components/GeneralInformation/node_modules' does not exist, skipping all lookups in it.
Scoped package detected, looking in 'cypress__skip-test'
Directory 'src/pages/EServices/components/node_modules' does not exist, skipping all lookups in it.
Scoped package detected, looking in 'cypress__skip-test'
Directory 'src/pages/EServices/node_modules' does not exist, skipping all lookups in it.
Scoped package detected, looking in 'cypress__skip-test'
Directory 'src/pages/node_modules' does not exist, skipping all lookups in it.
Scoped package detected, looking in 'cypress__skip-test'
Directory 'src/node_modules' does not exist, skipping all lookups in it.
Scoped package detected, looking in 'cypress__skip-test'
Directory 'node_modules/@types' does not exist, skipping all lookups in it.
Scoped package detected, looking in 'cypress__skip-test'
Directory 'packages/node_modules' does not exist, skipping all lookups in it.
Scoped package detected, looking in 'cypress__skip-test'
Found 'package.json' at 'node_modules/@cypress/skip-test/package.json'.
'package.json' does not have a 'typesVersions' field.
File 'node_modules/@cypress/skip-test.ts' does not exist.
File 'node_modules/@cypress/skip-test.tsx' does not exist.
File 'node_modules/@cypress/skip-test.d.ts' does not exist.
'package.json' does not have a 'typings' field.
'package.json' has 'types' field 'index.d.ts' that references 'node_modules/@cypress/skip-test/index.d.ts'.
File 'node_modules/@cypress/skip-test/index.d.ts' exist - use it as a name resolution result.
Resolving real path for 'node_modules/@cypress/skip-test/index.d.ts', result 'node_modules/@cypress/skip-test/index.d.ts'.
======== Module name '@cypress/skip-test' was successfully resolved to 'node_modules/@cypress/skip-test/index.d.ts' with Package ID '@cypress/skip-test/index.d.ts@2.5.0'. ========
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Skipping a test in Cypress conditionally - Stack Overflow
My intention is to check if an error is displayed on a website, and skip the test if it does. Otherwise continue with...
Read more >@cypress/skip-test - npm
Simple commands to skip a test based on platform, browser or an url. Latest version: 2.6.1, last published: 2 years ago.
Read more >TypeScript - Cypress Documentation
Cypress ships with official type declarations for TypeScript. This allows you to write your tests in TypeScript. Install TypeScript To use TypeScript.
Read more >Cypress Testing Library
Cypress Testing Library allows the use of dom-testing queries ... import '@testing-library/cypress/add-commands' ... With TypeScript.
Read more >Testing | Next.js
Cypress is a test runner used for End-to-End (E2E) and Integration Testing. ... pages/index.js import Link from 'next/link' export default function Home() ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
🎉 This issue has been resolved in version 2.6.1 🎉
The release is available on:
Your semantic-release bot 📦🚀
Sure if it fixed the problem
Sent from my iPhone