feat(scripts): support absolute path for cypress folder #33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes the issue with needing relative paths in cypress component tests that become extremely long.
The new import path is
import '#cypress/support/commands'
at present.Reasoning is as follows;
import 'cypress/support/commands'
is a little unclear as unlike our other absolute path imports this folder isn't a child of './src'. Also it clashes with the actual cypress packageimport { CyHttpMessages } from 'cypress/types/net-stubbing';
cy
are also unclear as this again is often used by cypress usage/implementation (not as a package though)local-cypress
instead of#cypress
is also up for debate, I prefer the#
as it's shorter and more clear that it's different.📦 Published PR as canary version:
Canary Versions
✨ Test out this PR locally via:
npm install @tablecheck/scripts@1.8.0-canary.33.38f66ef7c589077dc6e02d72250f01533188015b.0 # or yarn add @tablecheck/scripts@1.8.0-canary.33.38f66ef7c589077dc6e02d72250f01533188015b.0