purple-salesclerk-94323
08/18/2022, 4:10 PMlate-planet-4481
08/18/2022, 4:29 PMstocky-bird-14088
08/19/2022, 3:34 PMbefore:spec
. Apologies if this isn't the right place to raise this - feel free to send me to the right place! Thought I'd post here before raising an issue on github, I searched the issues and couldn't find anything related
before:spec
is triggered when running cypress via cypress open, the event will fire when the browser launches
This means that the values within spec
are no longer filled - as before Cypress 10, the browser was launched after selecting a spec file. Is this a known issue / is there a workaround ?stocky-bird-14088
08/22/2022, 8:40 AMfancy-airplane-60156
08/23/2022, 11:41 AMadorable-smartphone-87280
08/23/2022, 1:10 PMbest-flower-17510
08/23/2022, 2:44 PMfancy-airplane-60156
08/24/2022, 11:44 AMaloof-ram-15411
08/25/2022, 3:26 AMalert-area-86576
09/01/2022, 2:40 PMwonderful-match-15836
09/01/2022, 5:05 PMalert-area-86576
09/01/2022, 5:34 PMwonderful-match-15836
09/01/2022, 9:27 PMcypress open
? What do you see when you do?rough-vr-32180
09/04/2022, 2:15 PMfierce-activity-35946
09/07/2022, 1:02 PMError [ERR_LOADER_CHAIN_INCOMPLETE]:
"file:///Users/test/Library/Caches/Cypress/10.7.0/Cypress.app/Contents/Resources/app/node_modules/ts-node/esm/transpile-only.mjs 'resolve'" did not call the next hook in its chain and did not explicitly signal a short circuit. If this is intentional, include `shortCircuit: true` in the hook's return.
at new NodeError (node:internal/errors:387:5)
at ESMLoader.resolve (node:internal/modules/esm/loader:852:13)
at async ESMLoader.getModuleJob (node:internal/modules/esm/loader:431:7)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:533:24)
at async loadESM (node:internal/process/esm_loader:91:5)
at async handleMainPromise (node:internal/modules/run_main:65:12) {
code: 'ERR_LOADER_CHAIN_INCOMPLETE'
}
stale-optician-85950
09/07/2022, 1:16 PMfierce-activity-35946
09/07/2022, 3:16 PMfreezing-wall-7568
09/08/2022, 2:01 PMfreezing-wall-7568
09/08/2022, 2:01 PMfreezing-wall-7568
09/08/2022, 5:27 PMfreezing-wall-7568
09/08/2022, 5:27 PMalert-area-86576
09/08/2022, 7:34 PMrhythmic-army-81251
09/08/2022, 10:04 PMts
export default defineConfig({
// ...
resolve: {
extensions: ['.ts', '.js', '.json'],
alias: {
'@this-lib': path.resolve(__dirname, './src'),
'@other-lib': path.resolve(__dirname, '../other-lib/src'),
},
},
});
But when running the spec file Test.spec.ts
below:
ts
import { SomeEnum } from "@other-lib/SomeEnum";
describe('test', () => {
it('should work', () => {
cy.log('test' + SomeEnum.Cow);
});
});
I get the output:
The following error originated from your test code, not from Cypress.
> Failed to fetch dynamically imported module: http://localhost:8080/__cypress/src/src/specs/Test.spec.ts
When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.
Cypress could not associate this error to any specific test.
We dynamically generated a new test to display this failure.
rhythmic-army-81251
09/08/2022, 10:05 PMrhythmic-army-81251
09/08/2022, 10:05 PMts
export default defineConfig({
...cypressComponentConfig,
projectId: '3FAxCE',
component: {
specPattern: '**/*.spec.ts',
excludeSpecPattern: '**/*.{json,js}',
supportFile: 'src/support/index.ts',
indexHtmlFile: 'src/support/index.html',
devServer: {
bundler: 'vite',
framework: 'vue',
},
}
});
rhythmic-army-81251
09/08/2022, 10:05 PMviteConfig
property importing the vite.config.ts
to no availmysterious-motherboard-13344
09/09/2022, 11:36 AMvictorious-father-41976
09/09/2022, 11:47 AMvictorious-father-41976
09/09/2022, 12:51 PM