1 week ago

How to use mixing in cypress of vue/cli 4 app?

Posted 1 week ago by PetroGromovo

Hello, In vue/cli 4 app using cypress for testing I want to use my mixing and for this in my tests/e2e/specs/fileupload_tests.js I added declaration:

import faker from 'faker'
import 'cypress-file-upload'
import appMixin from '../../../src/appMixin'        // Full path is src/appMixin.js

describe('Admin category fileupload functionality', () => {
    it('category fileupload', () => {

But I see error in my browser :

export default function _typeof(obj) {
ParseError: 'import' and 'export' may appear only with 'sourceType: module'

That is not error of invalid mixing path - in this case I got different error.

Which way is valid ?

    "axios": "^0.19.0",
    "core-js": "^3.3.2",
    "cypress-file-upload": "^3.5.3",
    "vue": "^2.6.10",


Please sign in or create an account to participate in this conversation.