0.18.0
Released Released on November 26, 2016
Notes:
We've created a new example recipes repo to show you common testing scenarios including how to use the new module support.
Summary:
We've added automatic ES2015+, module, JSX, and CJSX support to all test files. This means you can use
require,import, orexportdeclarations to load other files. You can also use this to import your own application specific JavaScript modules and write unit tests for them. More of these details are yet to come. See this issue.You can now use your regularly installed
node_modulesin your project to do things like utilizinglodashfor utility functions or extendingchaiwith assertion plugins.Because we're now processing the spec files prior to handing them off to the browser, this means we will display problems like syntax errors when something in the processing goes wrong. Additionally, we print these out during
cypress run, so you're not stuck wondering what went wrong.
Breaking Changes:
Previously, we auto-magically included all files within
cypress/support. This has now gone away and we've simplified this to automatically including a singlecypress/support/index.jsfile. That single file acts as the entry point meaning you shouldimportorrequirethe other support files you'd like to include. Although this is still "automatic" it's much less magical and we'll be updating all of our docs to reflect this. The purpose ofcypress/supporthasn't really changed, just the implementation of it has. We will automatically seed acypress/support/index.jsfile for you (even on existing projects). The file location ofcypress/support/index.jscan be changed with the newsupportFileoption in yourcypress.json. This feature can also be turned off by specifyingsupportFile: false.
Features:
We now support ES2015+, modules, and JSX in all spec files. Fixes #246.
Spec files may now be written as
.js,.jsx,.coffee, orcjsxfiles.Test files with JS syntax errors are now handled and we provide a GUI that points to the exact line/column number. Additionally we print these out during
cypress runand exit the process withcode 1. Fixes #293.
Misc:
We improved the logic around when and if we scaffold files on a new project. We're much smarter about this and not generating these forcibly every time. Fixes #285.
Simplified handling of support files and made them less "magical". Fixes #286.
Renamed
supportFoldertosupportFileincypress.json. We will automatically rename yourcypress.jsonif this property was present on update.