wallabyjs / public

Repository for Wallaby.js questions and issues
http://wallabyjs.com
758 stars 45 forks source link

Failing preprocessors with Vuejs cli 3.9 and typescript #2485

Closed martinsson closed 4 years ago

martinsson commented 4 years ago

Issue

I'm unable to correctly run wallaby with both automatic config and the example from "supported technologies" https://wallabyjs.com/docs/integration/vue.html#vue-cli-3x---typescript-and-jest

I tried updating jest from 23.* to 26, but to no avail. using Vue cli 3.9.0 and both typescript

automatic config

In automatic configuration it does discover a few tests, but far from all and it gives me the error "regeneratorRuntime is not defined"

manual config

Using the config from the doc I get "Failed to run preprocessors on src/components/TemplateInvitation.js, TypeError: ./src/components/TemplateInvitation.js: Cannot read property 'bindings' of null "

A sligthly different config worked a while ago on the same project

module.exports = wallaby => {
    process.env.VUE_CLI_BABEL_TRANSPILE_MODULES = true

    return {
        files: ['src/**/*', 'jest.config.js', 'package.json', 'tsconfig.json'],

        tests: ['tests/**/*.spec.ts'],

        env: {
            type: 'node'
        },

        preprocessors: {
            '**/*.js?(x)': file => require('@babel/core').transform(
                file.content,
                {
                    sourceMap: true,
                    compact: false,
                    filename: file.path,
                    presets: ['@babel/preset-env'],
                    plugins: ['babel-plugin-jest-hoist', '@babel/plugin-syntax-dynamic-import']
                })
        },

        setup(wallaby) {
            const jestConfig = require('./package').jest || require('./jest.config')
            delete jestConfig.transform['^.+\\.tsx?$']
            wallaby.testFramework.configure(jestConfig)
        },

        testFramework: 'jest',

        debug: false
    }
}

package.json

"dependencies": {
    "@fortawesome/fontawesome-free": "^5.9.0",
    "@types/js-cookie": "^2.2.5",
    "@types/lodash": "^4.14.149",
    "@types/vue-i18n": "^7.0.0",
    "axios": "^0.19.0",
    "bootstrap-vue": "^2.0.0-rc.26",
    "cypress": "^4.4.1",
    "i18n": "^0.8.4",
    "js-cookie": "^2.2.1",
    "jwt-decode": "^2.2.0",
    "lodash": "^4.17.15",
    "papaparse": "^5.1.1",
    "read-excel-file": "^4.0.5",
    "serve": "^11.1.0",
    "tslib": "^1.10.0",
    "vue": "^2.6.10",
    "vue-class-component": "^7.0.2",
    "vue-i18n": "^8.15.3",
    "vue-papa-parse": "^1.3.0",
    "vue-property-decorator": "^8.1.0",
    "vue-router": "^3.1.5"
  },
  "devDependencies": {
    "@babel/core": "^7.5.5",
    "@babel/plugin-syntax-dynamic-import": "^7.2.0",
    "@babel/preset-env": "^7.5.5",
    "@types/jest": "^26.0.5",
    "@types/sinon": "^7.0.13",
    "@vue/cli-plugin-typescript": "^3.9.0",
    "@vue/cli-plugin-unit-jest": "^3.9.0",
    "@vue/cli-service": "^3.9.0",
    "@vue/test-utils": "1.0.0-beta.29",
    "babel-preset-env": "^1.7.0",
    "jest": "^26.1.0",
    "jest-transform-stub": "^2.0.0",
    "less": "^3.0.4",
    "less-loader": "^4.1.0",
    "sinon": "^7.3.2",
    "ts-jest": "^26.1.3",
    "typescript": "^3.4.3",
    "vue-template-compiler": "^2.6.10",
    "wait-on": "^3.3.0",
    "wallaby-vue-compiler": "^1.0.6"
  },
"jest": {
    "moduleFileExtensions": [
      "js",
      "jsx",
      "json",
      "vue",
      "ts",
      "tsx"
    ],
    "transform": {
      "^.+\\.vue$": "vue-jest",
      "^.+\\.ts?$": "ts-jest",
      "^.+\\.js$": "babel-jest"
    },
    "preset": "ts-jest/presets/js-with-ts",
    "transformIgnorePatterns": [
      "/node_modules/"
    ],
    "moduleNameMapper": {
      "^@/(.*)$": "<rootDir>/src/$1",
      "\\.(css|less|sass|scss)$": "<rootDir>/__mocks__/styleMock.js",
      "\\.(gif|ttf|eot|svg)$": "<rootDir>/__mocks__/fileMock.js"
    },
    "snapshotSerializers": [
      "jest-serializer-vue"
    ],
    "testMatch": [
      "**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"
    ],
    "testURL": "http://localhost/",
    "watchPlugins": [
      "jest-watch-typeahead/filename",
      "jest-watch-typeahead/testname"
    ]
  }

Wallaby diagnostics report

{ editorVersion: 'WebStorm 2020.1.1',
  pluginVersion: '1.0.146',
  editorType: 'IntelliJ',
  osVersion: 'darwin 19.4.0',
  nodeVersion: 'v11.1.0',
  coreVersion: '1.0.932',
  config:
   { diagnostics:
      { jest:
         { config:
            { configs:
               [ { automock: false,
                   cache: true,
                   cacheDirectory: '/private/var/folders/s8/snh3nx3n1xx7jdmjh7qsbqh00000gp/T/jest_dy',
                   clearMocks: false,
                   coveragePathIgnorePatterns: [ '/node_modules/' ],
                   cwd: '<homeDir>/clients/comongo/gestion-etude-back/Dev/front',
                   dependencyExtractor: undefined,
                   detectLeaks: undefined,
                   detectOpenHandles: undefined,
                   displayName: undefined,
                   errorOnDeprecated: false,
                   extraGlobals: [],
                   filter: undefined,
                   forceCoverageMatch: [],
                   globalSetup: undefined,
                   globalTeardown: undefined,
                   globals: {},
                   haste: { computeSha1: false, throwOnModuleCollision: false },
                   moduleDirectories: [ 'node_modules' ],
                   moduleFileExtensions: [ 'js', 'jsx', 'json', 'vue', 'ts', 'tsx' ],
                   moduleLoader: undefined,
                   moduleNameMapper:
                    [ [ '^@/(.*)$', '<homeDir>/clients/comongo/gestion-etude-back/Dev/front/src/$1' ],
                      [ '\\.(css|less|sass|scss)$', '<homeDir>/clients/comongo/gestion-etude-back/Dev/front/__mocks__/styleMock.js' ],
                      [ '\\.(gif|ttf|eot|svg)$', '<homeDir>/clients/comongo/gestion-etude-back/Dev/front/__mocks__/fileMock.js' ] ],
                   modulePathIgnorePatterns: [],
                   modulePaths: undefined,
                   name: '73fe0dbb804c29e7accbe28cf84dbff5',
                   prettierPath: 'prettier',
                   resetMocks: false,
                   resetModules: false,
                   resolver: undefined,
                   restoreMocks: false,
                   rootDir: '<homeDir>/clients/comongo/gestion-etude-back/Dev/front',
                   roots: [ '<homeDir>/clients/comongo/gestion-etude-back/Dev/front' ],
                   runner: 'jest-runner',
                   setupFiles: [],
                   setupFilesAfterEnv: [],
                   skipFilter: false,
                   skipNodeResolution: undefined,
                   snapshotResolver: undefined,
                   snapshotSerializers: [ '<homeDir>/clients/comongo/gestion-etude-back/Dev/front/node_modules/jest-serializer-vue/index.js' ],
                   testEnvironment: '<homeDir>/clients/comongo/gestion-etude-back/Dev/front/node_modules/jest-environment-jsdom/build/index.js',
                   testEnvironmentOptions: {},
                   testLocationInResults: false,
                   testMatch: [ '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)' ],
                   testPathIgnorePatterns: [ '/node_modules/' ],
                   testRegex: [],
                   testRunner: '<homeDir>/clients/comongo/gestion-etude-back/Dev/front/node_modules/jest-cli/node_modules/jest-jasmine2/build/index.js',
                   testURL: 'http://localhost/',
                   timers: 'real',
                   transform:
                    [ [ '^.+\\.vue$', '<homeDir>/clients/comongo/gestion-etude-back/Dev/front/node_modules/vue-jest/vue-jest.js', {} ],
                      [ '^.+\\.ts?$', '<homeDir>/clients/comongo/gestion-etude-back/Dev/front/node_modules/ts-jest/dist/index.js', {} ],
                      [ '^.+\\.js$', '<homeDir>/clients/comongo/gestion-etude-back/Dev/front/node_modules/jest-cli/node_modules/babel-jest/build/index.js', {} ],
                      [ '^.+\\.[tj]sx?$', '<homeDir>/clients/comongo/gestion-etude-back/Dev/front/node_modules/ts-jest/dist/index.js', {} ] ],
                   transformIgnorePatterns: [ '/node_modules/' ],
                   unmockedModulePathPatterns: undefined,
                   watchPathIgnorePatterns: [] } ],
              globalConfig:
               { bail: 0,
                 changedFilesWithAncestor: false,
                 changedSince: undefined,
                 collectCoverage: false,
                 collectCoverageFrom: [],
                 collectCoverageOnlyFrom: undefined,
                 coverageDirectory: '<homeDir>/clients/comongo/gestion-etude-back/Dev/front/coverage',
                 coverageProvider: 'babel',
                 coverageReporters: [ 'json', 'text', 'lcov', 'clover' ],
                 coverageThreshold: undefined,
                 detectLeaks: undefined,
                 detectOpenHandles: undefined,
                 enabledTestsMap: undefined,
                 errorOnDeprecated: false,
                 expand: false,
                 filter: undefined,
                 findRelatedTests: false,
                 forceExit: false,
                 globalSetup: undefined,
                 globalTeardown: undefined,
                 json: false,
                 lastCommit: false,
                 listTests: undefined,
                 logHeapUsage: false,
                 maxConcurrency: 5,
                 maxWorkers: 11,
                 noSCM: undefined,
                 noStackTrace: false,
                 nonFlagArgs: undefined,
                 notify: false,
                 notifyMode: 'failure-change',
                 onlyChanged: false,
                 onlyFailures: false,
                 outputFile: undefined,
                 passWithNoTests: undefined,
                 projects: [],
                 replname: undefined,
                 reporters: undefined,
                 rootDir: '<homeDir>/clients/comongo/gestion-etude-back/Dev/front',
                 runTestsByPath: false,
                 silent: undefined,
                 skipFilter: false,
                 testFailureExitCode: 1,
                 testNamePattern: undefined,
                 testPathPattern: '',
                 testResultsProcessor: undefined,
                 testSequencer: '<homeDir>/clients/comongo/gestion-etude-back/Dev/front/node_modules/@jest/test-sequencer/build/index.js',
                 testTimeout: undefined,
                 updateSnapshot: 'new',
                 useStderr: false,
                 verbose: undefined,
                 watch: false,
                 watchAll: false,
                 watchPlugins:
                  [ { config: {}, path: '<homeDir>/clients/comongo/gestion-etude-back/Dev/front/node_modules/jest-watch-typeahead/filename.js' },
                    { config: {}, path: '<homeDir>/clients/comongo/gestion-etude-back/Dev/front/node_modules/jest-watch-typeahead/testname.js' } ],
                 watchman: true },
              hasDeprecationWarnings: false,
              wallaby:
               { roots: [],
                 watchPathIgnorePatterns: [ '/node_modules/', '\\./dist/|\\./build/|\\./coverage/|/\\.cache/|/\\.idea/|/\\.vscode/|/\\.git/|/\\.gitlab/' ],
                 testPathIgnorePatterns: [ '/node_modules/', '\\./dist/|\\./build/|\\./coverage/|/\\.cache/|/\\.idea/|/\\.vscode/|/\\.git/|/\\.gitlab/' ],
                 testMatch: [ '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)' ],
                 testRegex: [] } } } },
     testFramework: { version: 'jest@24.8.0', configurator: 'jest@24.8.0', reporter: 'jest@24.8.0', starter: 'jest@24.8.0', autoDetected: true },
     filesWithCoverageCalculated: [],
     globalSetup: false,
     micromatch: true,
     files:
      [ { pattern: '/node_modules/', regexp: /\/node_modules\//, ignore: true, trigger: true, load: true },
        { pattern: '\\./dist/|\\./build/|\\./coverage/|/\\.cache/|/\\.idea/|/\\.vscode/|/\\.git/|/\\.gitlab/',
          regexp: /\.\/dist\/|\.\/build\/|\.\/coverage\/|\/\.cache\/|\/\.idea\/|\/\.vscode\/|\/\.git\/|\/\.gitlab\//,
          ignore: true,
          trigger: true,
          load: true },
        { pattern: '**/**', ignore: false, trigger: true, load: true, order: 1 },
        { pattern: '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)', ignore: true, trigger: true, load: true } ],
     tests:
      [ { pattern: '/node_modules/', regexp: /\/node_modules\//, ignore: true, trigger: true, load: true, test: true },
        { pattern: '\\./dist/|\\./build/|\\./coverage/|/\\.cache/|/\\.idea/|/\\.vscode/|/\\.git/|/\\.gitlab/',
          regexp: /\.\/dist\/|\.\/build\/|\.\/coverage\/|\/\.cache\/|\/\.idea\/|\/\.vscode\/|\/\.git\/|\/\.gitlab\//,
          ignore: true,
          trigger: true,
          load: true,
          test: true },
        { pattern: '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)', ignore: false, trigger: true, load: true, test: true, order: 2 } ],
     filesWithNoCoverageCalculated: [],
     runAllTestsInAffectedTestFile: false,
     updateNoMoreThanOneSnapshotPerTestFileRun: false,
     compilers: {},
     preprocessors: {},
     maxConsoleMessagesPerTest: 100,
     autoConsoleLog: true,
     delays: { run: 0, edit: 100, update: 0 },
     workers: { initial: 0, regular: 0, recycle: false },
     teardown: undefined,
     hints:
      { ignoreCoverage: '__REGEXP /ignore coverage|istanbul ignore/',
        ignoreCoverageForFile: '__REGEXP /ignore file coverage/',
        commentAutoLog: '?',
        testFileSelection: { include: '__REGEXP /file\\.only/', exclude: '__REGEXP /file\\.skip/' } },
     automaticTestFileSelection: true,
     runSelectedTestsOnly: false,
     extensions: {},
     env: { type: 'node', params: {}, runner: '<homeDir>/.nvm/versions/node/v11.1.0/bin/node', viewportSize: { width: 800, height: 600 }, options: { width: 800, height: 600 }, bundle: true },
     reportUnhandledPromises: true,
     slowTestThreshold: 75,
     lowCoverageThreshold: 80,
     loose: true,
     configCode: 'auto.detect#-1268198997' },
  packageJSON:
   { dependencies:
      { '@fortawesome/fontawesome-free': '^5.9.0',
        '@types/js-cookie': '^2.2.5',
        '@types/lodash': '^4.14.149',
        '@types/vue-i18n': '^7.0.0',
        axios: '^0.19.0',
        'bootstrap-vue': '^2.0.0-rc.26',
        cypress: '^4.4.1',
        i18n: '^0.8.4',
        'js-cookie': '^2.2.1',
        'jwt-decode': '^2.2.0',
        lodash: '^4.17.15',
        papaparse: '^5.1.1',
        'read-excel-file': '^4.0.5',
        serve: '^11.1.0',
        tslib: '^1.10.0',
        vue: '^2.6.10',
        'vue-class-component': '^7.0.2',
        'vue-i18n': '^8.15.3',
        'vue-papa-parse': '^1.3.0',
        'vue-property-decorator': '^8.1.0',
        'vue-router': '^3.1.5' },
     devDependencies:
      { '@babel/core': '^7.5.5',
        '@babel/plugin-syntax-dynamic-import': '^7.2.0',
        '@babel/preset-env': '^7.5.5',
        '@types/jest': '^26.0.5',
        '@types/sinon': '^7.0.13',
        '@vue/cli-plugin-typescript': '^3.9.0',
        '@vue/cli-plugin-unit-jest': '^3.9.0',
        '@vue/cli-service': '^3.9.0',
        '@vue/test-utils': '1.0.0-beta.29',
        'babel-preset-env': '^1.7.0',
        jest: '^26.1.0',
        'jest-transform-stub': '^2.0.0',
        less: '^3.0.4',
        'less-loader': '^4.1.0',
        sinon: '^7.3.2',
        'ts-jest': '^26.1.3',
        typescript: '^3.4.3',
        'vue-template-compiler': '^2.6.10',
        'wait-on': '^3.3.0',
        'wallaby-vue-compiler': '^1.0.6' } },
  fs: { numberOfFiles: 121 },
  debug:
   [ '2020-07-21T20:24:33.400Z angular/cli config Angular CLI not found.\n',
     '2020-07-21T20:24:33.553Z jest/config Detected Jest.\n',
     '2020-07-21T20:24:33.554Z jest/config Configured Jest.\n',
     '2020-07-21T20:24:33.556Z project Wallaby Node version: v11.1.0\n',
     '2020-07-21T20:24:33.556Z project Wallaby config: <homeDir>/clients/comongo/gestion-etude-back/Dev/front/auto.detect\n',
     '2020-07-21T20:24:34.365Z project File cache: <homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/6e74d91e300261b7\n',
     '2020-07-21T20:24:34.375Z uiService Listening port 51235\n',
     '2020-07-21T20:24:34.379Z project package.json file change detected, invalidating local cache\n',
     '2020-07-21T20:24:34.391Z workers Parallelism for initial run: 10, for regular run: 5\n',
     '2020-07-21T20:24:34.391Z workers Starting run worker instance #0\n',
     '2020-07-21T20:24:34.391Z workers Starting run worker instance #1\n',
     '2020-07-21T20:24:34.391Z workers Starting run worker instance #2\n',
     '2020-07-21T20:24:34.391Z workers Starting run worker instance #3\n',
     '2020-07-21T20:24:34.391Z workers Starting run worker instance #4\n',
     '2020-07-21T20:24:34.391Z workers Starting run worker instance #5\n',
     '2020-07-21T20:24:34.391Z workers Starting run worker instance #6\n',
     '2020-07-21T20:24:34.391Z workers Starting run worker instance #7\n',
     '2020-07-21T20:24:34.391Z workers Starting run worker instance #8\n',
     '2020-07-21T20:24:34.391Z workers Starting run worker instance #9\n',
     '2020-07-21T20:24:34.392Z workers Web server is listening at 53081\n',
     '2020-07-21T20:24:34.392Z project File cache requires some updates, waiting required files from IDE\n',
     '2020-07-21T20:24:34.480Z project Stopping process pool\n',
     '2020-07-21T20:24:34.484Z project Test run started; run priority: 3\n',
     '2020-07-21T20:24:34.486Z project Running all tests\n',
     '2020-07-21T20:24:34.490Z workers Starting test run, priority: 3\n',
     '2020-07-21T20:24:34.490Z workers Distributing tests between 10 workers\n',
     '2020-07-21T20:24:34.492Z workers Running tests in parallel\n',
     '2020-07-21T20:24:34.492Z nodeRunner Starting sandbox [worker #0, session #c233b]\n',
     '2020-07-21T20:24:34.492Z nodeRunner Starting sandbox [worker #1, session #3wd5p]\n',
     '2020-07-21T20:24:34.492Z nodeRunner Starting sandbox [worker #2, session #7112j]\n',
     '2020-07-21T20:24:34.492Z nodeRunner Starting sandbox [worker #3, session #y5gg1]\n',
     '2020-07-21T20:24:34.492Z nodeRunner Starting sandbox [worker #4, session #4w4mz]\n',
     '2020-07-21T20:24:34.493Z nodeRunner Starting sandbox [worker #5, session #4izkn]\n',
     '2020-07-21T20:24:34.493Z nodeRunner Starting sandbox [worker #6, session #4o4ve]\n',
     '2020-07-21T20:24:34.498Z nodeRunner Preparing sandbox [worker #0, session #c233b]\n',
     '2020-07-21T20:24:34.498Z nodeRunner Preparing sandbox [worker #1, session #3wd5p]\n',
     '2020-07-21T20:24:34.498Z nodeRunner Preparing sandbox [worker #2, session #7112j]\n',
     '2020-07-21T20:24:34.498Z nodeRunner Preparing sandbox [worker #3, session #y5gg1]\n',
     '2020-07-21T20:24:34.498Z nodeRunner Preparing sandbox [worker #4, session #4w4mz]\n',
     '2020-07-21T20:24:34.498Z nodeRunner Preparing sandbox [worker #5, session #4izkn]\n',
     '2020-07-21T20:24:34.498Z nodeRunner Preparing sandbox [worker #6, session #4o4ve]\n',
     '2020-07-21T20:24:34.718Z workers Started run worker instance (delayed) #0\n',
     '2020-07-21T20:24:34.719Z nodeRunner Prepared sandbox [worker #0, session #c233b]\n',
     '2020-07-21T20:24:34.719Z workers [worker #0, session #c233b] Running tests in sandbox\n',
     '2020-07-21T20:24:34.732Z workers Started run worker instance (delayed) #5\n',
     '2020-07-21T20:24:34.733Z nodeRunner Prepared sandbox [worker #5, session #4izkn]\n',
     '2020-07-21T20:24:34.733Z workers [worker #5, session #4izkn] Running tests in sandbox\n',
     '2020-07-21T20:24:34.733Z workers Started run worker instance (delayed) #4\n',
     '2020-07-21T20:24:34.734Z nodeRunner Prepared sandbox [worker #4, session #4w4mz]\n',
     '2020-07-21T20:24:34.734Z workers [worker #4, session #4w4mz] Running tests in sandbox\n',
     '2020-07-21T20:24:34.734Z workers Started run worker instance (delayed) #3\n',
     '2020-07-21T20:24:34.735Z nodeRunner Prepared sandbox [worker #3, session #y5gg1]\n',
     '2020-07-21T20:24:34.735Z workers [worker #3, session #y5gg1] Running tests in sandbox\n',
     '2020-07-21T20:24:34.735Z workers Started run worker instance (delayed) #1\n',
     '2020-07-21T20:24:34.735Z nodeRunner Prepared sandbox [worker #1, session #3wd5p]\n',
     '2020-07-21T20:24:34.736Z workers [worker #1, session #3wd5p] Running tests in sandbox\n',
     '2020-07-21T20:24:34.736Z workers Started run worker instance (delayed) #2\n',
     '2020-07-21T20:24:34.736Z nodeRunner Prepared sandbox [worker #2, session #7112j]\n',
     '2020-07-21T20:24:34.736Z workers [worker #2, session #7112j] Running tests in sandbox\n',
     '2020-07-21T20:24:34.747Z workers Started run worker instance (delayed) #8\n',
     '2020-07-21T20:24:34.748Z workers Started run worker instance (delayed) #6\n',
     '2020-07-21T20:24:34.749Z nodeRunner Prepared sandbox [worker #6, session #4o4ve]\n',
     '2020-07-21T20:24:34.750Z workers [worker #6, session #4o4ve] Running tests in sandbox\n',
     '2020-07-21T20:24:34.759Z workers Started run worker instance (delayed) #7\n',
     '2020-07-21T20:24:34.760Z workers Started run worker instance (delayed) #9\n',
     '2020-07-21T20:24:41.742Z workers [4izkn] Loaded unknown number of test(s)\n',
     '2020-07-21T20:24:41.744Z workers [4izkn] Test executed: must be hidden when the study status is deployed\n',
     '2020-07-21T20:24:41.746Z workers [y5gg1] Loaded unknown number of test(s)\n',
     '2020-07-21T20:24:41.747Z workers [4izkn] Test executed: must be hidden when the study status is closed\n',
     '2020-07-21T20:24:41.748Z workers [y5gg1] Test executed: dots are not valid\n',
     '2020-07-21T20:24:41.749Z workers [4izkn] Test executed: must be visible when the study status is draft\n',
     '2020-07-21T20:24:41.749Z workers [y5gg1] Test executed: underscores are not valid\n',
     '2020-07-21T20:24:41.750Z workers [4izkn] Test executed: must be hidden when the study status is draft\n',
     '2020-07-21T20:24:41.750Z workers [y5gg1] Test executed: special characters are not valid\n',
     '2020-07-21T20:24:41.751Z workers [4izkn] Test executed: must be visible when the study status is deployed\n',
     '2020-07-21T20:24:41.751Z workers [y5gg1] Test executed: uppercase characters are not valid\n',
     '2020-07-21T20:24:41.751Z workers [4izkn] Test executed: must be hidden when the study status is closed\n',
     '2020-07-21T20:24:41.751Z workers [y5gg1] Test executed: spaces are not allowed\n',
     '2020-07-21T20:24:41.752Z workers [4izkn] Test executed: must be hidden when the study status is draft\n',
     "2020-07-21T20:24:41.752Z workers [y5gg1] Test executed: hostname can't start with hyphen\n",
     '2020-07-21T20:24:41.752Z workers [4izkn] Test executed: must be hidden when the study status is closed\n',
     "2020-07-21T20:24:41.752Z workers [y5gg1] Test executed: hostname can't end with hyphen\n",
     '2020-07-21T20:24:41.753Z workers [4izkn] Test executed: must be visible when the study status is deployed\n',
     "2020-07-21T20:24:41.753Z workers [y5gg1] Test executed: hostname can't start and end with hyphen\n",
     '2020-07-21T20:24:41.753Z workers [4izkn] Test executed: must be hidden when the study status is draft\n',
     "2020-07-21T20:24:41.754Z workers [y5gg1] Test executed: hostname can't start with a number\n",
     '2020-07-21T20:24:41.754Z workers [4izkn] Test executed: must be hidden when the study status is closed\n',
     '2020-07-21T20:24:41.754Z workers [y5gg1] Test executed: valid hostname hyphen\n',
     '2020-07-21T20:24:41.754Z workers [4izkn] Test executed: must be visible when the study status is deployed\n',
     '2020-07-21T20:24:41.755Z workers [y5gg1] Test executed: valid hostname lowercase\n',
     '2020-07-21T20:24:41.756Z workers [y5gg1] Test executed: valid hostname end with number\n',
     '2020-07-21T20:24:41.758Z workers [4izkn] Run 12 test(s), skipped 0 test(s)\n',
     '2020-07-21T20:24:41.760Z workers [y5gg1] Run 12 test(s), skipped 0 test(s)\n',
     '2020-07-21T20:24:41.763Z workers [4izkn] Sandbox is responsive, closing it\n',
     '2020-07-21T20:24:41.765Z workers [y5gg1] Sandbox is responsive, closing it\n',
     '2020-07-21T20:24:41.802Z workers [7112j] Loaded unknown number of test(s)\n',
     '2020-07-21T20:24:41.802Z workers [7112j] Test executed: Axios test api with sinon stub\n',
     '2020-07-21T20:24:41.803Z workers [7112j] Run 1 test(s), skipped 0 test(s)\n',
     '2020-07-21T20:24:41.805Z workers [7112j] Sandbox is responsive, closing it\n',
     '2020-07-21T20:24:42.876Z workers Sandbox (active) [c233b] error: regeneratorRuntime is not defined\n',
     '2020-07-21T20:24:42.879Z workers [c233b] Run 0 test(s), skipped 0 test(s)\n',
     '2020-07-21T20:24:42.881Z workers [c233b] Sandbox is responsive, closing it\n',
     '2020-07-21T20:24:42.942Z workers Sandbox (active) [4w4mz] error: regeneratorRuntime is not defined\n',
     '2020-07-21T20:24:42.943Z workers [4w4mz] Run 0 test(s), skipped 0 test(s)\n',
     '2020-07-21T20:24:42.945Z workers [4w4mz] Sandbox is responsive, closing it\n',
     '2020-07-21T20:24:43.140Z workers Sandbox (active) [4o4ve] error: regeneratorRuntime is not defined\n',
     '2020-07-21T20:24:43.142Z workers [4o4ve] Run 0 test(s), skipped 0 test(s)\n',
     '2020-07-21T20:24:43.143Z workers [4o4ve] Sandbox is responsive, closing it\n',
     '2020-07-21T20:24:43.219Z workers Sandbox (active) [3wd5p] error: regeneratorRuntime is not defined\n',
     '2020-07-21T20:24:43.220Z workers [3wd5p] Run 0 test(s), skipped 0 test(s)\n',
     '2020-07-21T20:24:43.221Z workers [3wd5p] Sandbox is responsive, closing it\n',
     '2020-07-21T20:24:43.222Z workers Merging parallel test run results\n',
     '2020-07-21T20:24:43.223Z project Test run finished\n',
     '2020-07-21T20:24:43.223Z project Processed console.log entries\n',
     '2020-07-21T20:24:43.223Z project Processed loading sequences\n',
     '2020-07-21T20:24:43.224Z project Processed executed tests\n',
     '2020-07-21T20:24:43.228Z project Processed code coverage\n',
     '2020-07-21T20:24:43.261Z project Test run result processed and sent to IDE\n' ] }
martinsson commented 4 years ago

Adding the diagnostics report using the manual config

{ editorVersion: 'WebStorm 2020.1.1',
  pluginVersion: '1.0.146',
  editorType: 'IntelliJ',
  osVersion: 'darwin 19.4.0',
  nodeVersion: 'v11.1.0',
  coreVersion: '1.0.932',
  config:
   { files:
      [ { pattern: 'src/**/*', ignore: false, trigger: true, load: true, instrument: true, order: 1 },
        { pattern: 'jest.config.js', ignore: false, trigger: true, load: true, instrument: true, order: 2 },
        { pattern: 'package.json', ignore: false, trigger: true, load: true, instrument: true, order: 3 },
        { pattern: 'tsconfig.json', ignore: false, trigger: true, load: true, instrument: true, order: 4 },
        { pattern: 'tests/**/*.spec.ts.snap', ignore: false, instrument: false, trigger: true, load: true, order: 5 } ],
     tests: [ { pattern: 'tests/**/*.spec.ts', ignore: false, trigger: true, load: true, test: true, order: 6 } ],
     env: { type: 'node', params: {}, runner: '<homeDir>/.nvm/versions/node/v11.1.0/bin/node', viewportSize: { width: 800, height: 600 }, options: { width: 800, height: 600 }, bundle: true },
     preprocessors: { '**/*.js?(x)': [Function: **/*.js?(x)], 'package.json': [Function] },
     testFramework: { version: 'jest@0.4.3', configurator: 'jest@0.4.3', reporter: 'jest@0.4.3', starter: 'jest@0.4.3' },
     diagnostics: {},
     filesWithNoCoverageCalculated: [],
     runAllTestsInAffectedTestFile: false,
     updateNoMoreThanOneSnapshotPerTestFileRun: false,
     compilers: { '**/*.?(lit)coffee?(.md)': [Function] },
     maxConsoleMessagesPerTest: 100,
     autoConsoleLog: true,
     delays: { run: 0, edit: 100, update: 0 },
     workers: { initial: 0, regular: 0, recycle: false },
     teardown: undefined,
     hints:
      { ignoreCoverage: '__REGEXP /ignore coverage|istanbul ignore/',
        ignoreCoverageForFile: '__REGEXP /ignore file coverage/',
        commentAutoLog: '?',
        testFileSelection: { include: '__REGEXP /file\\.only/', exclude: '__REGEXP /file\\.skip/' } },
     automaticTestFileSelection: true,
     runSelectedTestsOnly: false,
     extensions: {},
     reportUnhandledPromises: true,
     slowTestThreshold: 75,
     lowCoverageThreshold: 80,
     loose: true,
     configCode:
      "// module.exports = wallaby => {\n//     process.env.VUE_CLI_BABEL_TRANSPILE_MODULES = true\n//\n//     return {\n//         files: ['src/**/*', 'jest.config.js', 'package.json', 'tsconfig.json'],\n//\n//         tests: ['tests/**/*.spec.ts'],\n//\n//         env: {\n//             type: 'node'\n//         },\n//\n//         preprocessors: {\n//             '**/*.js?(x)': file => require('@babel/core').transform(\n//                 file.content,\n//                 {\n//                     sourceMap: true,\n//                     compact: false,\n//                     filename: file.path,\n//                     presets: ['@babel/preset-env'],\n//                     plugins: ['babel-plugin-jest-hoist', '@babel/plugin-syntax-dynamic-import']\n//                 })\n//         },\n//\n//         setup(wallaby) {\n//             const jestConfig = require('./package').jest || require('./jest.config')\n//             delete jestConfig.transform['^.+\\\\.tsx?$']\n//             wallaby.testFramework.configure(jestConfig)\n//         },\n//\n//         testFramework: 'jest',\n//\n//         debug: false\n//     }\n// }\nmodule.exports = wallaby => {\n    process.env.VUE_CLI_BABEL_TRANSPILE_MODULES = true;\n\n    return {\n        files: ['src/**/*', 'jest.config.js', 'package.json', 'tsconfig.json'],\n\n        tests: ['tests/**/*.spec.ts'],\n\n        env: {\n            type: 'node'\n        },\n\n        preprocessors: {\n            '**/*.js?(x)': file => require('@babel/core').transform(\n                file.content,\n                {sourceMap: true, compact: false, filename: file.path, plugins: ['babel-plugin-jest-hoist']})\n        },\n\n        setup(wallaby) {\n            const jestConfig = require('./package').jest || require('./jest.config')\n            delete jestConfig.transform['^.+\\\\.tsx?$']\n            wallaby.testFramework.configure(jestConfig)\n        },\n\n        testFramework: 'jest'\n    }\n}\n" },
  packageJSON:
   { dependencies:
      { '@fortawesome/fontawesome-free': '^5.9.0',
        '@types/js-cookie': '^2.2.5',
        '@types/lodash': '^4.14.149',
        '@types/vue-i18n': '^7.0.0',
        axios: '^0.19.0',
        'bootstrap-vue': '^2.0.0-rc.26',
        cypress: '^4.4.1',
        i18n: '^0.8.4',
        'js-cookie': '^2.2.1',
        'jwt-decode': '^2.2.0',
        lodash: '^4.17.15',
        papaparse: '^5.1.1',
        'read-excel-file': '^4.0.5',
        serve: '^11.1.0',
        tslib: '^1.10.0',
        vue: '^2.6.10',
        'vue-class-component': '^7.0.2',
        'vue-i18n': '^8.15.3',
        'vue-papa-parse': '^1.3.0',
        'vue-property-decorator': '^8.1.0',
        'vue-router': '^3.1.5' },
     devDependencies:
      { '@babel/core': '^7.5.5',
        '@babel/plugin-syntax-dynamic-import': '^7.2.0',
        '@babel/preset-env': '^7.5.5',
        '@types/jest': '^26.0.5',
        '@types/sinon': '^7.0.13',
        '@vue/cli-plugin-typescript': '^3.9.0',
        '@vue/cli-plugin-unit-jest': '^3.9.0',
        '@vue/cli-service': '^3.9.0',
        '@vue/test-utils': '1.0.0-beta.29',
        'babel-preset-env': '^1.7.0',
        jest: '^26.1.0',
        'jest-transform-stub': '^2.0.0',
        less: '^3.0.4',
        'less-loader': '^4.1.0',
        sinon: '^7.3.2',
        'ts-jest': '^26.1.3',
        typescript: '^3.4.3',
        'vue-template-compiler': '^2.6.10',
        'wait-on': '^3.3.0',
        'wallaby-vue-compiler': '^1.0.6' } },
  fs: { numberOfFiles: 78 },
  debug:
   [ '2020-07-21T20:36:12.495Z project Wallaby Node version: v11.1.0\n',
     '2020-07-21T20:36:12.496Z project Wallaby config: <homeDir>/clients/comongo/gestion-etude-back/Dev/front/wallaby.js\n',
     '2020-07-21T20:36:13.207Z project File cache: <homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd\n',
     '2020-07-21T20:36:13.216Z uiService Listening port 51235\n',
     '2020-07-21T20:36:13.219Z project package.json file change detected, invalidating local cache\n',
     '2020-07-21T20:36:13.245Z workers Parallelism for initial run: 10, for regular run: 5\n',
     '2020-07-21T20:36:13.245Z workers Starting run worker instance #0\n',
     '2020-07-21T20:36:13.246Z workers Starting run worker instance #1\n',
     '2020-07-21T20:36:13.246Z workers Starting run worker instance #2\n',
     '2020-07-21T20:36:13.246Z workers Starting run worker instance #3\n',
     '2020-07-21T20:36:13.246Z workers Starting run worker instance #4\n',
     '2020-07-21T20:36:13.246Z workers Starting run worker instance #5\n',
     '2020-07-21T20:36:13.246Z workers Starting run worker instance #6\n',
     '2020-07-21T20:36:13.246Z workers Starting run worker instance #7\n',
     '2020-07-21T20:36:13.246Z workers Starting run worker instance #8\n',
     '2020-07-21T20:36:13.246Z workers Starting run worker instance #9\n',
     '2020-07-21T20:36:13.246Z workers Web server is listening at 55400\n',
     '2020-07-21T20:36:13.246Z project File cache requires some updates, waiting required files from IDE\n',
     '2020-07-21T20:36:14.212Z uiService UI client connected\n',
     '2020-07-21T20:36:14.213Z uiService Outgoing message ui:handshake\n',
     '2020-07-21T20:36:14.238Z uiService Incoming message ui:tests:resultsRequested\n',
     '2020-07-21T20:36:14.239Z uiService Outgoing message ui:tests:allResultsUpdated\n',
     '2020-07-21T20:36:14.240Z uiService Incoming message ui:start\n',
     '2020-07-21T20:36:14.241Z uiService Outgoing message ui:summary\n',
     '2020-07-21T20:36:14.244Z uiService Outgoing message ui:files\n',
     '2020-07-21T20:36:14.249Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:14.301Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:14.328Z workers Started run worker instance (delayed) #0\n',
     '2020-07-21T20:36:14.351Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:14.380Z workers Started run worker instance (delayed) #1\n',
     '2020-07-21T20:36:14.381Z workers Started run worker instance (delayed) #4\n',
     '2020-07-21T20:36:14.398Z workers Started run worker instance (delayed) #3\n',
     '2020-07-21T20:36:14.401Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:14.405Z workers Started run worker instance (delayed) #6\n',
     '2020-07-21T20:36:14.406Z workers Started run worker instance (delayed) #2\n',
     '2020-07-21T20:36:14.408Z workers Started run worker instance (delayed) #5\n',
     '2020-07-21T20:36:14.413Z workers Started run worker instance (delayed) #7\n',
     '2020-07-21T20:36:14.416Z workers Started run worker instance (delayed) #9\n',
     '2020-07-21T20:36:14.417Z workers Started run worker instance (delayed) #8\n',
     '2020-07-21T20:36:14.452Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:14.503Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:14.555Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:14.605Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:14.655Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:14.709Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:14.761Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:14.810Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:14.860Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:14.913Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:14.963Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.013Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.063Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.113Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.163Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.214Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.265Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.316Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.369Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.420Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.475Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.525Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.577Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.627Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.680Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.731Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.785Z uiService Outgoing message ui:busy\n',
     "2020-07-21T20:36:15.807Z project Error: Failed to run preprocessors on src/components/TemplateInvitation.js, TypeError: ./src/components/TemplateInvitation.js: Cannot read property 'bindings' of null\n    at Scope.moveBindingTo (./node_modules/@babel/traverse/lib/scope/index.js:929:13)\n    at convertBlockScopedToVar (./node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js:139:13)\n    at PluginPass.VariableDeclaration (./node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js:26:9)\n    at newFn (./node_modules/@babel/traverse/lib/visitors.js:175:21)\n    at NodePath._call (./node_modules/@babel/traverse/lib/path/context.js:55:20)\n    at NodePath.call (./node_modules/@babel/traverse/lib/path/context.js:42:17)\n    at NodePath.visit (./node_modules/@babel/traverse/lib/path/context.js:90:31)\n    at TraversalContext.visitQueue (./node_modules/@babel/traverse/lib/context.js:112:16)\n    at TraversalContext.visitQueue (./node_modules/@babel/traverse/lib/context.js:118:21)\n    at TraversalContext.visitSingle (./node_modules/@babel/traverse/lib/context.js:84:19)\n    at TraversalContext.visit (./node_modules/@babel/traverse/lib/context.js:140:19)\n    at Function.traverse.node (./node_modules/@babel/traverse/lib/index.js:82:17)\n    at NodePath.visit (./node_modules/@babel/traverse/lib/path/context.js:97:18)\n    at TraversalContext.visitQueue (./node_modules/@babel/traverse/lib/context.js:112:16)\n    at TraversalContext.visitMultiple (./node_modules/@babel/traverse/lib/context.js:79:17)\n    at TraversalContext.visit (./node_modules/@babel/traverse/lib/context.js:138:19)\n    at Function.traverse.node (./node_modules/@babel/traverse/lib/index.js:82:17)\n    at NodePath.visit (./node_modules/@babel/traverse/lib/path/context.js:97:18)\n    at TraversalContext.visitQueue (./node_modules/@babel/traverse/lib/context.js:112:16)\n    at TraversalContext.visitSingle (./node_modules/@babel/traverse/lib/context.js:84:19)\n    at TraversalContext.visit (./node_modules/@babel/traverse/lib/context.js:140:19)\n    at Function.traverse.node (./node_modules/@babel/traverse/lib/index.js:82:17)\n    at traverse (./node_modules/@babel/traverse/lib/index.js:64:12)\n    at transformFile (./node_modules/@babel/core/lib/transformation/index.js:107:29)\n    at transformFile.next (<anonymous>)\n    at run (./node_modules/@babel/core/lib/transformation/index.js:35:12)\n    at run.next (<anonymous>)\n    at Function.transform (./node_modules/@babel/core/lib/transform.js:27:41)\n    at transform.next (<anonymous>)\n    at evaluateSync (./node_modules/gensync/index.js:244:28)\n    at Function.sync (./node_modules/gensync/index.js:84:14)\n    at Object.transform (./node_modules/@babel/core/lib/transform.js:36:54)\n    at **/*.js?(x) (./wallaby.js:49:59)\n    at process.internalTickCallback (internal/process/next_tick.js:70:11)\n    at <homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/wallaby/server.js:24:8424\n    at _rejected (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/wallaby/node_modules/q/q.js:864:24)\n    at <homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/wallaby/node_modules/q/q.js:890:30\n    at Promise.when (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/wallaby/node_modules/q/q.js:1142:31)\n    at Promise.promise.promiseDispatch (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/wallaby/node_modules/q/q.js:808:41)\n    at <homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/wallaby/node_modules/q/q.js:624:44\n    at runSingle (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/wallaby/node_modules/q/q.js:137:13)\n    at flush (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/wallaby/node_modules/q/q.js:125:13)\n    at process.internalTickCallback (internal/process/next_tick.js:70:11)\n",
     '2020-07-21T20:36:15.808Z project Changes did not trigger any tests\n',
     '2020-07-21T20:36:15.808Z uiService Outgoing message ui:summary\n',
     '2020-07-21T20:36:15.809Z uiService Outgoing message ui:summary\n',
     '2020-07-21T20:36:15.836Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.844Z project Stopping process pool\n',
     '2020-07-21T20:36:15.846Z uiService Outgoing message ui:busy\n',
     '2020-07-21T20:36:15.852Z project Running postprocessor\n',
     '2020-07-21T20:36:15.861Z postprocessor New TypeScript language service is required\n',
     '2020-07-21T20:36:16.902Z project Re-attaching document block comment\n',
     '2020-07-21T20:36:18.189Z project Postprocessor execution finished\n',
     '2020-07-21T20:36:18.189Z project Test run started; run priority: 3\n',
     '2020-07-21T20:36:18.190Z project Running all tests\n',
     '2020-07-21T20:36:18.192Z workers Starting test run, priority: 3\n',
     '2020-07-21T20:36:18.192Z workers Distributing tests between 10 workers\n',
     '2020-07-21T20:36:18.193Z workers Running tests in parallel\n',
     '2020-07-21T20:36:18.193Z nodeRunner Starting sandbox [worker #0, session #aiinu]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Starting sandbox [worker #1, session #no5vk]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Starting sandbox [worker #2, session #ct31z]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Starting sandbox [worker #3, session #307u2]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Starting sandbox [worker #4, session #unvel]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Starting sandbox [worker #5, session #yly2v]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Starting sandbox [worker #6, session #cebyk]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Preparing sandbox [worker #0, session #aiinu]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Preparing sandbox [worker #1, session #no5vk]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Preparing sandbox [worker #2, session #ct31z]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Preparing sandbox [worker #3, session #307u2]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Preparing sandbox [worker #4, session #unvel]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Preparing sandbox [worker #5, session #yly2v]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Preparing sandbox [worker #6, session #cebyk]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Prepared sandbox [worker #0, session #aiinu]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Prepared sandbox [worker #1, session #no5vk]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Prepared sandbox [worker #2, session #ct31z]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Prepared sandbox [worker #3, session #307u2]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Prepared sandbox [worker #4, session #unvel]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Prepared sandbox [worker #5, session #yly2v]\n',
     '2020-07-21T20:36:18.193Z nodeRunner Prepared sandbox [worker #6, session #cebyk]\n',
     '2020-07-21T20:36:18.193Z workers [worker #0, session #aiinu] Running tests in sandbox\n',
     '2020-07-21T20:36:18.194Z workers [worker #1, session #no5vk] Running tests in sandbox\n',
     '2020-07-21T20:36:18.194Z workers [worker #2, session #ct31z] Running tests in sandbox\n',
     '2020-07-21T20:36:18.194Z workers [worker #3, session #307u2] Running tests in sandbox\n',
     '2020-07-21T20:36:18.195Z workers [worker #4, session #unvel] Running tests in sandbox\n',
     '2020-07-21T20:36:18.195Z workers [worker #5, session #yly2v] Running tests in sandbox\n',
     '2020-07-21T20:36:18.195Z workers [worker #6, session #cebyk] Running tests in sandbox\n',
     '2020-07-21T20:36:21.840Z workers [yly2v] Loaded unknown number of test(s)\n',
     '2020-07-21T20:36:21.841Z workers [yly2v] Test executed: must be hidden when the study status is deployed\n',
     '2020-07-21T20:36:21.842Z workers [yly2v] Test executed: must be hidden when the study status is closed\n',
     '2020-07-21T20:36:21.843Z workers [307u2] Loaded unknown number of test(s)\n',
     '2020-07-21T20:36:21.844Z workers [yly2v] Test executed: must be visible when the study status is draft\n',
     '2020-07-21T20:36:21.844Z workers [307u2] Test executed: dots are not valid\n',
     '2020-07-21T20:36:21.845Z workers [yly2v] Test executed: must be hidden when the study status is draft\n',
     '2020-07-21T20:36:21.846Z workers [307u2] Test executed: underscores are not valid\n',
     '2020-07-21T20:36:21.846Z workers [yly2v] Test executed: must be visible when the study status is deployed\n',
     '2020-07-21T20:36:21.847Z workers [307u2] Test executed: special characters are not valid\n',
     '2020-07-21T20:36:21.847Z workers [yly2v] Test executed: must be hidden when the study status is closed\n',
     '2020-07-21T20:36:21.848Z workers [307u2] Test executed: uppercase characters are not valid\n',
     '2020-07-21T20:36:21.849Z workers [yly2v] Test executed: must be hidden when the study status is draft\n',
     '2020-07-21T20:36:21.849Z workers [307u2] Test executed: spaces are not allowed\n',
     '2020-07-21T20:36:21.849Z workers [yly2v] Test executed: must be hidden when the study status is closed\n',
     "2020-07-21T20:36:21.850Z workers [307u2] Test executed: hostname can't start with hyphen\n",
     '2020-07-21T20:36:21.850Z workers [yly2v] Test executed: must be visible when the study status is deployed\n',
     "2020-07-21T20:36:21.850Z workers [307u2] Test executed: hostname can't end with hyphen\n",
     '2020-07-21T20:36:21.851Z workers [yly2v] Test executed: must be hidden when the study status is draft\n',
     "2020-07-21T20:36:21.851Z workers [307u2] Test executed: hostname can't start and end with hyphen\n",
     '2020-07-21T20:36:21.853Z workers [yly2v] Test executed: must be hidden when the study status is closed\n',
     "2020-07-21T20:36:21.853Z workers [307u2] Test executed: hostname can't start with a number\n",
     '2020-07-21T20:36:21.854Z workers [yly2v] Test executed: must be visible when the study status is deployed\n',
     '2020-07-21T20:36:21.854Z workers [307u2] Test executed: valid hostname hyphen\n',
     '2020-07-21T20:36:21.854Z workers [307u2] Test executed: valid hostname lowercase\n',
     '2020-07-21T20:36:21.855Z workers [307u2] Test executed: valid hostname end with number\n',
     '2020-07-21T20:36:21.860Z workers [yly2v] Run 12 test(s), skipped 0 test(s)\n',
     '2020-07-21T20:36:21.860Z workers [307u2] Run 12 test(s), skipped 0 test(s)\n',
     '2020-07-21T20:36:21.861Z workers [yly2v] Sandbox is responsive, closing it\n',
     '2020-07-21T20:36:21.862Z workers [307u2] Sandbox is responsive, closing it\n',
     '2020-07-21T20:36:21.983Z workers Sandbox (active) [ct31z] error: RangeError: Maximum call stack size exceeded\n',
     '2020-07-21T20:36:21.986Z workers Failed to map the stack to user code, entry message: RangeError: Maximum call stack size exceeded, stack: RangeError: Maximum call stack size exceeded\n    at _typeof (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd/instrumented/tests/unit/GoalsRepository.spec.js:3:1)\n    at _typeof (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd/instrumented/tests/unit/GoalsRepository.spec.js:3:88)\n    at _typeof (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd/instrumented/tests/unit/GoalsRepository.spec.js:3:88)\n    at _typeof (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd/instrumented/tests/unit/GoalsRepository.spec.js:3:88)\n    at _typeof (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd/instrumented/tests/unit/GoalsRepository.spec.js:3:88)\n    at _typeof (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd/instrumented/tests/unit/GoalsRepository.spec.js:3:88)\n    at _typeof (<homeDir>/Library/C\n',
     '2020-07-21T20:36:22.058Z workers Sandbox (active) [ct31z] error: y.spec.js:3:88)\n',
     '2020-07-21T20:36:22.059Z workers Failed to map the stack to user code, entry message: y.spec.js:3:88), stack: y.spec.js:3:88)\n    at _typeof (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd/instrumented/tests/unit/GoalsRepository.spec.js:3:88)\n    at _typeof (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd/instrumented/tests/unit/GoalsRepository.spec.js:3:88)\n    at _typeof (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd/instrumented/tests/unit/GoalsRepository.spec.js:3:88)\n    at _typeof (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd/instrumented/tests/unit/GoalsRepository.spec.js:3:88)\n    at _typeof (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd/instrumented/tests/unit/GoalsRepository.spec.js:3:88)\n    at _typeof (<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd/instrumented/tests/unit/GoalsRepository.spec.js:3:88)\n    at _typeof (<homeDir>/Library/Caches/JetBrains/WebStorm2020\n',
     '2020-07-21T20:36:22.067Z workers [ct31z] Run 0 test(s), skipped 0 test(s)\n',
     '2020-07-21T20:36:22.068Z workers [ct31z] Sandbox is responsive, closing it\n',
     '2020-07-21T20:36:22.174Z workers Sandbox (active) [unvel] error: <homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd/instrumented/src/components/Subject.vue:78\nimport Navigation from "./Navigation";\n       ^^^^^^^^^^\n\nSyntaxError: Unexpected identifier\n',
     '2020-07-21T20:36:22.199Z workers Sandbox (active) [aiinu] error: <homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd/instrumented/src/App.vue:16\nimport Navigation from "@/components/Navigation"\n       ^^^^^^^^^^\n\nSyntaxError: Unexpected identifier\n',
     '2020-07-21T20:36:22.262Z workers [unvel] Run 0 test(s), skipped 0 test(s)\n',
     '2020-07-21T20:36:22.264Z workers [unvel] Sandbox is responsive, closing it\n',
     '2020-07-21T20:36:22.275Z workers [aiinu] Run 0 test(s), skipped 0 test(s)\n',
     '2020-07-21T20:36:22.277Z workers [aiinu] Sandbox is responsive, closing it\n',
     `2020-07-21T20:36:22.305Z workers Sandbox (active) [no5vk] error: Jest encountered an unexpected token\n\nThis usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.\n\nBy default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".\n\nHere's what you can do:\n • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.\n • If you need a custom transformation specify a "transform" option in your config.\n • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.\n\nYou'll find more details and examples of these config options in the docs:\nhttps://jestjs.io/docs/en/configuration.html\n\nDetails:\n\n<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd/instrumented/src/components/Navigation.vue:26\nimport {NavigationService} from "@/Services/NavigationService";\n       ^\n\nSyntaxError: Unexpected token {\n`,
     `2020-07-21T20:36:22.312Z workers Sandbox (active) [cebyk] error: Jest encountered an unexpected token\n\nThis usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.\n\nBy default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".\n\nHere's what you can do:\n • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.\n • If you need a custom transformation specify a "transform" option in your config.\n • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.\n\nYou'll find more details and examples of these config options in the docs:\nhttps://jestjs.io/docs/en/configuration.html\n\nDetails:\n\n<homeDir>/Library/Caches/JetBrains/WebStorm2020.1/wallaby/projects/f6af8a7c1e4d36cd/instrumented/src/components/Navigation.vue:26\nimport {NavigationService} from "@/Services/NavigationService";\n       ^\n\nSyntaxError: Unexpected token {\n`,
     '2020-07-21T20:36:22.360Z workers [cebyk] Run 0 test(s), skipped 0 test(s)\n',
     '2020-07-21T20:36:22.361Z workers [cebyk] Sandbox is responsive, closing it\n',
     '2020-07-21T20:36:22.377Z workers [no5vk] Run 0 test(s), skipped 0 test(s)\n',
     '2020-07-21T20:36:22.378Z workers [no5vk] Sandbox is responsive, closing it\n',
     '2020-07-21T20:36:22.378Z workers Merging parallel test run results\n',
     '2020-07-21T20:36:22.382Z project Test run finished\n',
     '2020-07-21T20:36:22.383Z project Processed console.log entries\n',
     '2020-07-21T20:36:22.383Z project Processed loading sequences\n',
     '2020-07-21T20:36:22.384Z project Processed executed tests\n',
     '2020-07-21T20:36:22.386Z project Processed code coverage\n',
     '2020-07-21T20:36:22.408Z project Test run result processed and sent to IDE\n',
     '2020-07-21T20:36:22.408Z uiService Outgoing message ui:summary\n',
     '2020-07-21T20:36:22.410Z uiService Outgoing message ui:tests:allResultsUpdated\n',
     '2020-07-21T20:36:22.411Z uiService Outgoing message ui:coverageChanged\n' ] }
smcenlly commented 4 years ago

We used Vue cli 3.9.0 with both TypeScript configurations (with babel and without) and had a few problems when not selecting to use babel with TypeScript. We've updated our docs with manual configuration that works with both scenarios:

Vue CLI 3.x - TypeScript and Jest

module.exports = wallaby => {
  process.env.VUE_CLI_BABEL_TRANSPILE_MODULES = true;

  return {
    files: ['src/**/*', 'jest.config.js', 'package.json', 'tsconfig.json'],

    tests: ['tests/**/*.spec.ts'],

    env: {
      type: 'node'
    },

    preprocessors: {
      '**/*.js?(x)': file => require('@babel/core').transform(
        file.content,
        {sourceMap: true, compact: false, filename: file.path, presets: [require('babel-preset-jest'), require("@babel/preset-env")]})
    },

    setup(wallaby) {
      const jestConfig = require('./package').jest || require('./jest.config');
      jestConfig.transform && delete jestConfig.transform['^.+\\.tsx?$'];
      wallaby.testFramework.configure(jestConfig);
    },

    testFramework: 'jest'
  }
}

We also managed to upgrade both Vue CLI TypeScript configurations to use the latest version of Jest with the following changes:

package.json

  "devDependencies": {
    "@types/jest": "^23.1.4",
    "@vue/cli-plugin-babel": "^3.12.0",
    "@vue/cli-plugin-typescript": "^3.12.0",
-   "@vue/cli-plugin-unit-jest": "^3.12.0",
+   "@vue/cli-plugin-unit-jest": "^4.4.6",
    "@vue/cli-service": "^3.12.0",
    "@vue/test-utils": "1.0.0-beta.29",
    "babel-core": "7.0.0-bridge.0",
-   "ts-jest": "^23.0.0",
+   "ts-jest": "^26.1.3",
    "typescript": "^3.4.3",
    "vue-template-compiler": "^2.6.10"
  },

Please note that we had to delete our package-lock.json after making these changes to get this working.


If possible, we recommend upgrading your jest version. Outside of Wallaby, the latest version of jest has a number of fixes and performance optimizations that you'll benefit from. In addition, Wallaby is faster using automatic configuration and much closer to jest execution pipeline (usually if you have problems in Wallaby, you'll have the same problems in jest).

If you're still having problems and the above don't work for you:

martinsson commented 4 years ago

Thanks for the suggestions. I updated the libs as suggested. For autoconfig I have the same error "regeneratorRuntime is not defined".

The error was always blocking on .js files in the sources so I transformed them into typescript. Now using the suggested wallaby.js config I got an error

this._config.extraGlobals is not iterable

Which I solved by adding an empty array extraGlobals: [] in the jest config

Which brings me to :

SyntaxError: Unexpected identifier
Runtime error: ./src/components/Subject.vue:78
import Navigation from "./Navigation";
       ^^^^^^^^^^

Now Subject.vue is a vue file using javascript (not typescript syntax) and so there seems to be a problem with js code not being transpiled. How can that be solved in the wallabyjs config?

Here's an excerpt of subject.vue


<script>
    import Navigation from "./Navigation";
martinsson commented 4 years ago

Problem solved by changing the babel.rc from

{
  "presets": ["env"]
}

to

{
  "presets": ["@vue/cli-plugin-babel/preset"]
}

now using automatic configuration and the newer versions of jest dependencies as you mentioned

I'm ok to close this issue. Thanks for the help