Open tea7day opened 6 years ago
Anyone found a fix for this?
Temporary fix
` const webpack = require('@cypress/webpack-preprocessor'); const { VueLoaderPlugin } = require('vue-loader');
const webpackOptions = { module: { rules: [ { test: /.vue$/, loader: 'vue-loader' } ] }, plugins: [ // make sure to include the plugin for the magic new VueLoaderPlugin() ] };
const options = { // send in the options from your webpack.config.js, so it works the same // as your app's code webpackOptions, watchOptions: {} };
module.exports = (on, config) => { on( 'file:preprocessor', webpack(options) // webpack({ // webpackOptions: require('@vue/cli-service/webpack.config'), // watchOptions: {} // }) );
return Object.assign({}, config, { fixturesFolder: 'tests/e2e/fixtures', integrationFolder: 'tests/e2e/specs', screenshotsFolder: 'tests/e2e/screenshots', videosFolder: 'tests/e2e/videos', supportFile: 'tests/e2e/support/index.js' }); }; `
I have cypress running in the E2E tests of vue-apollo
. Do you have a minimal runnable reproduction?
E2E tests throw an error originating in vue-cli-plugin-apollo/index.js:58
It would seem cypress does not understand spread syntax.
Current behavior:
Tests failed because of unknown syntax
Desired behavior:
Tests work
Steps to reproduce:
$vue create myapp
->Manually select features
->add e2e testing(cypress)
)$vue add apollo
, default choice)$yarn test:e2e
)Versions
@vue/cli: 3.0.5 @vue/cli-plugin-e2e-cypress: 3.0.5 vue-cli-plugin-apollo: 0.17.2