Testing components written in TypeScript with Sass imports
- Make sure the root project has been built .
# in the root of the project
npm install
npm run build- Run
npm installin this folder to symlink the@cypress/reactdependency.
# in this folder
npm install- Start Cypress
npm run cy:open
# or just run headless tests
npm testNotice that Node Sass is a binary dependency, thus we need to run it using the same system version of Node as we installed. See cypress.json file.
{
"nodeVersion": "system"
}To bundle code using the same webpack.config.js file, we point at it from cypress/plugins/index.js file.
