Giter Site home page Giter Site logo

Comments (8)

bahmutov avatar bahmutov commented on June 1, 2024 1

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.

bahmutov avatar bahmutov commented on June 1, 2024 1

from cypress-react-unit-test.

glomotion avatar glomotion commented on June 1, 2024

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.

glomotion avatar glomotion commented on June 1, 2024

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.

glomotion avatar glomotion commented on June 1, 2024

@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.

glomotion avatar glomotion commented on June 1, 2024

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;
}

Screen Shot 2020-10-15 at 11 04 39 am

from cypress-react-unit-test.

glomotion avatar glomotion commented on June 1, 2024

@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.

glomotion avatar glomotion commented on June 1, 2024

FOUND IT!@!~#$%^!@
the problem was this webpack plugin: new MiniCssExtractPlugin(),
Removing it... fixed the issue!

from cypress-react-unit-test.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.