Comments (8)
this is EXACTLY why I am moving all examples folders to have their own package.json with all dependencies as described in https://glebbahmutov.com/blog/testing-pyramids/ and I need to finish this and factor out the examples/sass-and-ts
folder
from cypress-react-unit-test.
from cypress-react-unit-test.
incasse it helps... here is some extra debug info from the console while trying to run with extra webpack debug info:
cypress:webpack stats had error(s) +8s
cypress:webpack errored bundling /Users/timpaul/Library/Application Support/Cypress/cy/production/projects/test-cypress-typescript-react-ffdf18db96b66e8934f9c769081501f9/bundles/src/components/vertical-space/vertical-space.cypress.test.tsx.js Webpack Compilation Error
./src/components/vertical-space/vertical-space.cypress.test.tsx
Module build failed (from ./node_modules/ts-loader/index.js):
Error: TypeScript emitted no output for /Users/timpaul/Desktop/GIT-Repos/test-cypress-typescript-react/src/components/vertical-space/vertical-space.cypress.test.tsx. +8ms
cypress:webpack - compile finished for /Users/timpaul/Desktop/GIT-Repos/test-cypress-typescript-react/src/components/vertical-space/vertical-space.cypress.test.tsx, initial? true +93ms
Webpack Compilation Error
./src/components/vertical-space/vertical-space.cypress.test.tsx
Module build failed (from ./node_modules/ts-loader/index.js):
Error: TypeScript emitted no output for /Users/timpaul/Desktop/GIT-Repos/test-cypress-typescript-react/src/components/vertical-space/vertical-space.cypress.test.tsx.
GET /__cypress/tests?p=src/components/vertical-space/vertical-space.cypress.test.tsx 200 8680.292 ms - 431
cypress:webpack finished bundling /Users/timpaul/Library/Application Support/Cypress/cy/production/projects/test-cypress-typescript-react-ffdf18db96b66e8934f9c769081501f9/bundles/cypress/support/index.js +432ms
cypress:webpack - compile finished for /Users/timpaul/Desktop/GIT-Repos/test-cypress-typescript-react/cypress/support/index.js, initial? true +7ms
from cypress-react-unit-test.
I am now beginning to suspect it might be a dependency version issue:
// package.json:
...
"cypress-react-unit-test": "^4.16.0",
"cypress": "^5.3.0",
"typescript": "^4.0.3",
"webpack": "^4.44.2",
...
from cypress-react-unit-test.
@bahmutov Would you be able to let me know what dependency versions this example was last seen working with?
https://github.com/bahmutov/cypress-react-unit-test/blob/main/examples/sass-and-ts/package.json
from cypress-react-unit-test.
https://github.com/glomotion/test-cypress-typescript-react
so i've simplified my webpack loaders - and removed ts-loader from the equation (much like the sass-and-ts example).
I keep on getting this plugins crash error:
Error: Callback was already called.
at throwError (/Users/timpaul/Desktop/GIT-Repos/test-cypress-typescript-react/node_modules/neo-async/async.js:16:11)
at /Users/timpaul/Desktop/GIT-Repos/test-cypress-typescript-react/node_modules/neo-async/async.js:2818:7
at processTicksAndRejections (internal/process/task_queues.js:76:11)
my plugins/index.js file is SUPER simple:
// load file preprocessor that comes with this plugin
// https://github.com/bahmutov/cypress-react-unit-test#install
module.exports = (on, config) => {
// from the root of the project (folder with cypress.json file)
config.env.webpackFilename = 'internals/webpack/webpack.cypress.config.js';
require('cypress-react-unit-test/plugins/load-webpack')(on, config);
// IMPORTANT to return the config object
// with the any changed environment variables
return config;
}
from cypress-react-unit-test.
@bahmutov - so i'm under pretty extreme time pressure to arrive at a solution for visual unit testing of react components within a project i'm on atm ... and i want soo badly to be able to use cypress to do it (i have loved cypress for a long time now!).
Is there any chance you might take a look at my repo and help me fix cypress/plugins/index.js
?
from cypress-react-unit-test.
FOUND IT!@!~#$%^!@
the problem was this webpack plugin: new MiniCssExtractPlugin(),
Removing it... fixed the issue!
from cypress-react-unit-test.
Related Issues (20)
- Create example showing how to test a component with MobX v6 HOT 1
- Error: Webpack Compilation Error HOT 1
- How one can attach to window custom fields? HOT 6
- Show example with Webpack + TypeScript + aliases HOT 1
- Move app dependencies into every folder HOT 2
- Update older versions in external repositories HOT 1
- Cannot find module node_modules/get-package-type/index (in nyc module) HOT 5
- loadWebpack plugin doesn't work with terser, @rails/webpacker HOT 8
- Node V8.11.2 is not supported HOT 1
- command init crashes because of missing templates/next module HOT 1
- Error: ... please place the spec in component folder HOT 4
- Fix date-fns material date pickers in Percy example HOT 1
- Create example with Webpack 5 HOT 1
- Next.js plugin is treating the entire projectRoot as pages HOT 3
- Can't resolve 'readLine' HOT 1
- No tests found when using cypress open HOT 3
- webpack 5 and cypress-react-unit-test image assets
- [Question] Stubbing/Mocking redux hooks in mountHook HOT 4
- Conflicting preprocessors for component and BDD tests HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cypress-react-unit-test.