Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.

Conversation

@dmtrKovalenko
Copy link
Contributor

Created example and also make it possible to use @babel/preset-typescript without any additional webpack config mutation

@@ -0,0 +1,27 @@
module.exports = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified that it works also with babel.config.js. Should we rename this because 'cypress-react-unit-test/plugins/babelrc' looks confusing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, rename it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I've been not clear. I mean the name of plugin itself. It will require breaking change, right? Or just make a new alias name?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right - ok, in that case we probably better with an alias, like react-scripts is an alias to car.

const webpackPreprocessor = require('@cypress/webpack-preprocessor')
const { addImageRedirect } = require('../utils/add-image-redirect')

const wpPreprocessorOptions = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another question – do we need to keep using defaultOptions? Or we can just make our own

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not change unless necessary

Comment on lines +37 to +40
# notice a trick to avoid re-installing dependencies
# in this job - a do-nothing "install-command" parameter
install-command: echo 'Nothing to install in this job'
# we are not going to use results from this job anywhere else
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What the motivation for using cypress/run instead of normal docker container with node?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

caching, all OSS dependencies are present, restores the CircleCI workspace correctly. If you want to recreate this, see the expanded config at circle, it is giant https://app.circleci.com/pipelines/github/bahmutov/cypress-react-unit-test/635/config

this config is 330 lines, expanded 1000

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally the above command would have "parallel" flag, in that case it skips the install. Since we are just reusing workspace from the previous install job, I have to hack skipping the install. I should probably just add a flag to our orb install: false to do this better

@bahmutov
Copy link
Contributor

bahmutov commented Sep 9, 2020

super, looks good

@bahmutov bahmutov merged commit 6599b21 into main Sep 10, 2020
@bahmutov bahmutov deleted the chore/babel-ts-example branch September 10, 2020 11:16
@bahmutov
Copy link
Contributor

🎉 This PR is included in version 4.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

dmtrKovalenko added a commit to cypress-io/cypress that referenced this pull request Oct 1, 2020
…#408) * Add babel-typescipt example * Run new example on CI * chore: run markdown links checks only on main (cypress-io/cypress-react-unit-test#404) * chore: Improve typings (cypress-io/cypress-react-unit-test#405) * check out files before checking links * just use normal cypress run job * Improve Readme Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3 participants