Cypress: spread operator support

Created on 11 Nov 2017  路  7Comments  路  Source: cypress-io/cypress

Any plans to support transform-object-rest-spread plugin? It would make tests neater, whenever necessary.

Most helpful comment

Can you give us a sample of a file preprocessor to use in order to have the spread operator, please ?
I'm a little lost in webpack/babel preprocessor configuration :(

Thanks !

All 7 comments

This is actually done (it is a PR right now). It's part of the plugins / extensions API which is documented here: https://github.com/cypress-io/cypress/issues/684

Sounds good, thank you!

Released in 1.1.0.

Can you give us a sample of a file preprocessor to use in order to have the spread operator, please ?
I'm a little lost in webpack/babel preprocessor configuration :(

Thanks !

I'd also like native spread operator support for Cypress. It's strange that I can't use syntax which is natively supported by node.

I created a new issue in our docs to document use of the spread operator within the preprocessor here: https://github.com/cypress-io/cypress-documentation/issues/533. Our documentation is open source and contributions are welcome.

@hsellou If you're already using webpack, this should get you where you want to be (includes examples): https://github.com/cypress-io/cypress-webpack-preprocessor

Was this page helpful?
0 / 5 - 0 ratings