wallabyjs / public

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

Could not find getSnapshotState in entry point for file #3258

Closed TeaBough closed 1 year ago

TeaBough commented 1 year ago

I'm getting this warning :

console.warn: Initialization: Wallaby is not compatible with current version of Vitest.
Could not find getSnapshotState in entry point for file file:///home/tibo/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/vendor-index.9378c9a4.js.

It's looking in the wrong node_modules... it's looking for the one at the root of the workspace instead of getting vitest in the module projectA... How could I fix that ?

{
  editorVersion: 'IntelliJ IDEA 2023.2',
  pluginVersion: '1.0.270',
  editorType: 'IntelliJ',
  osVersion: 'linux 6.2.6-76060206-generic',
  nodeVersion: 'v16.14.0',
  coreVersion: '1.0.1459',
  checksum: 'NjFjNGQ4NGNlZWE4Y2RlZmI0MWQwMWVhODdmMjcyNTUsMTcwMjA4MDAwMDAwMCww',
  config: {
    localProjectDir: '<homeDir>/src/workspace/app/',
    projectCacheDir: '<homeDir>/.cache/JetBrains/IntelliJIdea2023.2/wallaby/projects/5ace56e8f3a13773/instrumented',
    compilers: { coffeeScript: [Function (anonymous)], babel: [Function (anonymous)], typeScript: [Function: typeScript] },
    postprocessors: { typeScript: [Function (anonymous)], webpack: [Function (anonymous)] },
    override: [Function: override],
    defaults: { files: { ignore: false, trigger: true, load: true, instrument: true }, tests: { ignore: false, trigger: true, load: true } },
    files: [
      { pattern: 'src/**/*.js', ignore: false, trigger: true, load: true, instrument: true, order: 1 },
      { pattern: 'src/**/*.tsx', ignore: false, trigger: true, load: true, instrument: true, order: 2 },
      { pattern: 'src/**/*.ts', ignore: false, trigger: true, load: true, instrument: true, order: 3 },
      { pattern: 'src/**/*.test.ts', ignore: true, trigger: true, load: true, instrument: true, file: true },
      { pattern: 'src/**/*.test.tsx', ignore: true, trigger: true, load: true, instrument: true, file: true }
    ],
    tests: [
      { pattern: 'src/**/*.test.ts', ignore: false, trigger: true, load: true, test: true, order: 4 },
      { pattern: 'src/**/*.test.tsx', ignore: false, trigger: true, load: true, test: true, order: 5 }
    ],
    diagnostics: {
      vitest: {
        file: {
          config: '/// <reference types="vitest" />\n' +
            "import { defineConfig } from 'vite';\n" +
            "import tsconfigPaths from 'vite-tsconfig-paths';\n" +
            '// @ts-ignore\n' +
            "import svgrPlugin from 'vite-plugin-svgr';\n" +
            "import react from '@vitejs/plugin-react';\n" +
            '\n' +
            "const path = require('path');\n" +
            '\n' +
            '// https://vitejs.dev/config/\n' +
            'export default defineConfig({\n' +
            '  resolve: {\n' +
            '    alias: {\n' +
            "      '@tailwindConfig': path.resolve(__dirname, 'tailwind.config.cjs'),\n" +
            '    },\n' +
            '  },\n' +
            '  optimizeDeps: {\n' +
            "    include: ['@tailwindConfig'],\n" +
            '  },\n' +
            '  plugins: [\n' +
            '    react({\n' +
            '      babel: {\n' +
            '        presets: [\n' +
            '          [\n' +
            "            '@babel/preset-react',\n" +
            "            { runtime: 'automatic', importSource: '@emotion/react' },\n" +
            '          ],\n' +
            '        ],\n' +
            '\n' +
            '        plugins: [\n' +
            "          '@emotion/babel-plugin',\n" +
            '          [\n' +
            "            'babel-plugin-twin',\n" +
            '            {\n' +
            '              // cf https://github.com/ben-rogerson/babel-plugin-twin/issues/9\n' +
            '              exclude: [\n' +
            "                '\\x00commonjsHelpers.js', // Avoid build error\n" +
            '              ],\n' +
            '            },\n' +
            '          ],\n' +
            "          'babel-plugin-macros',\n" +
            '        ],\n' +
            '      },\n' +
            '    }),\n' +
            '    tsconfigPaths(),\n' +
            '    svgrPlugin(),\n' +
            '  ],\n' +
            '  server: {\n' +
            '    port: 9003,\n' +
            '  },\n' +
            '  test: {\n' +
            '    globals: true,\n' +
            '    testTimeout: 120000,\n' +
            '    // maxThreads: 1,\n' +
            '    // minThreads: 1,\n' +
            "    environment: 'jsdom',\n" +
            "    setupFiles: ['./src/testing/setupTests.ts'],\n" +
            '    exclude: [\n' +
            "      './e2e',\n" +
            "      '**/node_modules/**',\n" +
            "      '**/dist/**',\n" +
            "      '**/.{idea,git,cache,output,temp}/**',\n" +
            "      '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,tsup,build}.config.*',\n" +
            '    ],\n' +
            '  },\n' +
            '});\n'
        },
        config: {
          allowOnly: true,
          watch: true,
          globals: true,
          environment: 'jsdom',
          threads: true,
          clearMocks: false,
          restoreMocks: false,
          mockReset: false,
          include: [ '**/*.{test,spec}.?(c|m)[jt]s?(x)' ],
          exclude: [ './e2e', '**/node_modules/**', '**/dist/**', '**/.{idea,git,cache,output,temp}/**', '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,tsup,build}.config.*' ],
          testTimeout: 120000,
          hookTimeout: 10000,
          teardownTimeout: 10000,
          isolate: true,
          watchExclude: [ '**/node_modules/**', '**/dist/**' ],
          forceRerunTriggers: [ '**/package.json/**', '**/{vitest,vite}.config.*/**', '<homeDir>/src/workspace/app/src/testing/setupTests.ts' ],
          update: false,
          reporters: [ 'default' ],
          silent: false,
          hideSkippedTests: false,
          ui: false,
          uiBase: '/__vitest__/',
          open: true,
          css: { include: [], modules: { classNameStrategy: 'stable' } },
          coverage: {
            provider: 'v8',
            enabled: false,
            clean: true,
            cleanOnRerun: true,
            reportsDirectory: './coverage',
            exclude: [
              'coverage/**',
              'dist/**',
              'packages/*/test?(s)/**',
              '**/*.d.ts',
              '**/virtual:*',
              '**/__x00__*',
              '**/\x00*',
              'cypress/**',
              'test?(s)/**',
              'test?(-*).?(c|m)[jt]s?(x)',
              '**/*{.,-}{test,spec}.?(c|m)[jt]s?(x)',
              '**/__tests__/**',
              '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
              '**/.{eslint,mocha,prettier}rc.{?(c|m)js,yml}',
              'src/testing/setupTests.ts',
              'src/testing/setupTests.ts'
            ],
            reportOnFailure: false,
            reporter: [ [ 'text', {} ], [ 'html', {} ], [ 'clover', {} ], [ 'json', {} ] ],
            extension: [
              '.js',  '.cjs',
              '.mjs', '.ts',
              '.mts', '.cts',
              '.tsx', '.jsx',
              '.vue', '.svelte'
            ]
          },
          fakeTimers: { loopLimit: 10000, shouldClearNativeTimers: true, toFake: [ 'setTimeout', 'clearTimeout', 'setInterval', 'clearInterval', 'setImmediate', 'clearImmediate', 'Date' ] },
          maxConcurrency: 5,
          dangerouslyIgnoreUnhandledErrors: false,
          typecheck: {
            checker: 'tsc',
            include: [ '**/*.{test,spec}-d.?(c|m)[jt]s?(x)' ],
            exclude: [
              '**/node_modules/**',
              '**/dist/**',
              '**/cypress/**',
              '**/.{idea,git,cache,output,temp}/**',
              '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*'
            ]
          },
          slowTestThreshold: 300,
          setupFiles: [ '<homeDir>/src/workspace/app/src/testing/setupTests.ts' ],
          defines: {},
          root: '<homeDir>/src/workspace/app',
          mode: [],
          inspect: false,
          inspectBrk: false,
          singleThread: false,
          deps: { moduleDirectories: [ '/node_modules/' ] },
          server: { deps: { inline: [ {}, {}, {}, '@nuxt/test-utils' ], moduleDirectories: [ '/node_modules/' ], cacheDir: 'node_modules/.vitest' } },
          snapshotOptions: { snapshotFormat: {}, updateSnapshot: 'new', snapshotEnvironment: null },
          experimentalVmWorkerMemoryLimit: 8410462720,
          cache: { dir: '<homeDir>/src/workspace/app/node_modules/.vitest' },
          sequence: { hooks: 'parallel' },
          environmentMatchGlobs: [],
          browser: { enabled: false, headless: false, slowHijackESM: true, api: { port: 63315 } },
          testTransformMode: {},
          package: {
            version: '0.34.1',
            urls: { hooks: 'file://<homeDir>/.cache/JetBrains/IntelliJIdea2023.2/wallaby/wallaby/runners/node/hooks.mjs' },
            paths: {
              root: '<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest',
              dist: '<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist'
            }
          }
        }
      }
    },
    testFramework: { version: 'vitest@0.14.0', configurator: 'vitest@0.14.0', reporter: 'vitest@0.14.0', starter: 'vitest@0.14.0', autoDetected: true },
    preserveComments: false,
    extractComments: true,
    workers: { initial: 1, regular: 1, recycle: false },
    captureConsoleLog: true,
    filesWithNoCoverageCalculated: [],
    runAllTestsInAffectedTestFile: false,
    updateNoMoreThanOneSnapshotPerTestFileRun: false,
    smartStart: [ { test: true, source: false, pattern: '**/*', startMode: 'open' }, { test: false, source: true, pattern: '**/*', startMode: 'edit' } ],
    logLimits: { inline: { depth: 5, elements: 5000 }, values: { default: { stringLength: 200 }, autoExpand: { elements: 5000, stringLength: 8192, depth: 10 } } },
    preprocessors: {},
    maxConsoleMessagesPerTest: 100,
    autoConsoleLog: true,
    delays: { run: 0, edit: 100, update: 0 },
    teardown: undefined,
    hints: {
      ignoreCoverage: '__REGEXP /ignore coverage|istanbul ignore|c8 ignore/',
      ignoreCoverageForFile: '__REGEXP /ignore file coverage/',
      commentAutoLog: '?',
      testFileSelection: { include: '__REGEXP /file\\.only/', exclude: '__REGEXP /file\\.skip/' }
    },
    automaticTestFileSelection: true,
    runSelectedTestsOnly: true,
    mapConsoleMessagesStackTrace: false,
    extensions: {},
    env: {
      type: 'node',
      params: { runner: '--experimental-loader=file://<homeDir>/.cache/JetBrains/IntelliJIdea2023.2/wallaby/wallaby/runners/node/hooks.mjs' },
      runner: '<homeDir>/.nvm/versions/node/v16.14.0/bin/node',
      viewportSize: { width: 800, height: 600 },
      options: { width: 800, height: 600 },
      bundle: true
    },
    reportUnhandledPromises: true,
    slowTestThreshold: 75,
    lowCoverageThreshold: 80,
    runAllTestsWhenNoAffectedTests: true,
    symlinkNodeModules: undefined,
    configCode: 'module.exports = wallaby => ({\n' +
      '  ...wallaby,\n' +
      '  autoDetect: true,\n' +
      '  files: [\n' +
      "    './src/**/*.js',\n" +
      "    './src/**/*.tsx',\n" +
      "    './src/**/*.ts',\n" +
      "    { pattern: 'src/**/*.test.ts', ignore: true },\n" +
      "    { pattern: 'src/**/*.test.tsx', ignore: true },\n" +
      '  ],\n' +
      "  tests: ['src/**/*.test.ts', 'src/**/*.test.tsx'],\n" +
      '});\n',
    testLocations: [
      'src/components/PeriodeWeekTag/tests/getPeriodeAndWeek.test.ts',
      'src/utils/time/tests/getNearestDay.test.ts',
      'src/containers/Demarrage/steps/tests/computeNextStep.test.ts',
      'src/utils/tests/time.test.ts'
    ]
  },
  packageJSON: {
    dependencies: {
      axios: '^1.4.0',
      clsx: '^1.2.1',
      'date-arithmetic': '^4.1.0',
      'date-fns': '^2.30.0',
      'date-fns-tz': '^2.0.0',
      downshift: '^7.6.0',
      'fathom-client': '^3.5.0',
      'file-saver': '^2.0.5',
      filesize: '^10.0.7',
      'final-form': '^4.20.9',
      'final-form-arrays': '^3.1.0',
      'final-form-calculate': '^1.3.2',
      fontfaceobserver: '2.3.0',
      'hoist-non-react-statics': '3.3.2',
      'js-cookie': '^3.0.5',
      lodash: '^4.17.21',
      'lodash-es': '4.17.21',
      'match-sorter': '^6.3.1',
      nanoid: '^4.0.2',
      polished: '^4.1.2',
      'posthog-js': '^1.75.3',
      qs: '^6.11.0',
      react: '^18.2.0',
      'react-compound-slider': '^3.4.0',
      'react-confetti': '^6.1.0',
      'react-copy-to-clipboard': '^5.0.3',
      'react-day-picker': '^8.7.1',
      'react-detect-offline': '^2.4.3',
      'react-dom': '^18.2.0',
      'react-dropzone': '^14.2.3',
      'react-router-dom': '6.11.1',
      'replace-in-file': '^6.3.5',
      'sanitize.css': '13.0.0',
      'shallow-equal': '^3.1.0',
      'twin.macro': '^3.1.0',
      'typeface-inter': '^3.18.1',
      'use-debounce': '^9.0.4',
      'use-fit-text': '^2.4.0',
      uuid: '^9.0.0',
      validator: '^13.9.0',
      'workbox-window': '^6.5.4'
    },
    devDependencies: {
      '@babel/core': '^7.21.8',
      '@babel/preset-env': '^7.21.5',
      '@babel/preset-react': '7.18.6',
      '@popperjs/core': '^2.11.7',
      '@remix-run/web-fetch': '^4.3.4',
      '@tailwindcss/forms': '^0.5.3',
      '@tailwindcss/typography': '^0.5.9',
      '@types/node': '16.18.12',
      '@types/react': '18.2.6',
      '@types/react-beautiful-dnd': '13.1.4',
      '@types/react-dom': '18.2.4',
      '@types/testing-library__jest-dom': '^5.14.5',
      '@typescript-eslint/eslint-plugin': '5.59.5',
      '@typescript-eslint/parser': '5.59.5',
      '@vitejs/plugin-legacy': '^4.1.1',
      '@vitejs/plugin-react': '^4.0.4',
      '@vitest/runner': '^0.34.1',
      '@vitest/ui': '^0.34.1',
      'babel-plugin-macros': '^3.1.0',
      'babel-plugin-preval': '^5.1.0',
      'babel-plugin-twin': '^1.1.0',
      'cross-env': '^7.0.3',
      dns: '^0.2.2',
      dotenv: '^16.0.3',
      eslint: '8.40.0',
      esm: '3.2.25',
      'intersection-observer': '^0.12.2',
      jsdom: '^22.0.0',
      'lint-staged': '13.2.2',
      msw: '1.2.1',
      prettier: '^2.8.8',
      'prop-types': '^15.8.1',
      rimraf: '^5.0.0',
      tailwindcss: '^3.2.7',
      typescript: '^5.0.4',
      'utility-types': '^3.10.0',
      vite: '^4.4.9',
      'vite-node': '^0.34.1',
      'vite-plugin-pwa': '^0.16.4',
      'vite-plugin-svgr': '^3.2.0',
      'vite-tsconfig-paths': '^4.2.0',
      vitest: '^0.34.1'
    }
  },
  fs: { numberOfFiles: 2104 },
  debug: [
    '2023-08-09T12:04:01.689Z config Attempting automatic configuration for angular\n',
    '2023-08-09T12:04:01.692Z angular/cli config Angular CLI not found.\n',
    '2023-08-09T12:04:01.692Z config Finished attempting automatic configuration for angular (3ms)\n',
    '2023-08-09T12:04:01.692Z config Attempting automatic configuration for jest\n',
    "2023-08-09T12:04:01.693Z jest/config Error: Module jest-cli is not found in '<homeDir>/src/workspace/app'.\n" +
      '    at Object.loadJest (<homeDir>/.cache/JetBrains/IntelliJIdea2023.2/wallaby/wallaby/server.js:496:1070)\n' +
      '    at n (<homeDir>/.cache/JetBrains/IntelliJIdea2023.2/wallaby/wallaby/server.js:184:23339)\n' +
      '    at Object.configure (<homeDir>/.cache/JetBrains/IntelliJIdea2023.2/wallaby/wallaby/server.js:184:26449)\n' +
      '    at automaticConfigurationProviders.reduce.Promise.resolve.success (<homeDir>/.cache/JetBrains/IntelliJIdea2023.2/wallaby/wallaby/server.js:132:12015)\n' +
      '    at async automaticConfigurationProviders.reduce.Promise.resolve.success (<homeDir>/.cache/JetBrains/IntelliJIdea2023.2/wallaby/wallaby/server.js:132:11892)\n' +
      '    at async Config.load (<homeDir>/.cache/JetBrains/IntelliJIdea2023.2/wallaby/wallaby/server.js:132:11832)\n',
    '2023-08-09T12:04:01.693Z config Finished attempting automatic configuration for jest (1ms)\n',
    '2023-08-09T12:04:01.693Z config Attempting automatic configuration for vitest\n',
    '2023-08-09T12:04:01.695Z vitest/config Detected Vitest (0.34.1).\n',
    '2023-08-09T12:04:02.310Z config Finished attempting automatic configuration for vitest (617ms)\n',
    '2023-08-09T12:04:02.311Z project Wallaby Node version: v16.14.0\n',
    '2023-08-09T12:04:02.311Z project Wallaby config: <homeDir>/src/workspace/app/wallaby.js\n',
    '2023-08-09T12:04:02.324Z fs File system starting\n',
    '2023-08-09T12:04:02.880Z fs File system scan completed\n',
    '2023-08-09T12:04:02.894Z project File cache: <homeDir>/.cache/JetBrains/IntelliJIdea2023.2/wallaby/projects/5ace56e8f3a13773\n',
    '2023-08-09T12:04:02.942Z uiService Listening port 51235\n',
    '2023-08-09T12:04:02.999Z workers Parallelism for initial run: 1, for regular run: 1\n',
    '2023-08-09T12:04:02.999Z workers Starting run worker instance #0\n',
    '2023-08-09T12:04:03.002Z workers Web server is listening at 34245\n',
    '2023-08-09T12:04:03.016Z project File cache requires some updates, waiting required files from IDE\n',
    '2023-08-09T12:04:03.028Z project Stopping process pool\n',
    '2023-08-09T12:04:03.030Z project Test run started; run priority: 3\n',
    '2023-08-09T12:04:03.034Z project Running all tests\n',
    '2023-08-09T12:04:03.055Z project Test run finished\n',
    '2023-08-09T12:04:03.055Z project Test run data re-queued\n',
    '2023-08-09T12:04:03.067Z project Requested to run all tests\n',
    '2023-08-09T12:04:03.069Z project Requested to run all tests\n',
    '2023-08-09T12:04:03.070Z project Requested to run all tests\n',
    '2023-08-09T12:04:03.079Z project Test run started; run priority: 3\n',
    '2023-08-09T12:04:03.079Z project Running all tests\n',
    '2023-08-09T12:04:03.097Z workers Starting test run, priority: 3\n',
    '2023-08-09T12:04:03.097Z nodeRunner Starting sandbox [worker #0, session #klt5k]\n',
    '2023-08-09T12:04:03.097Z nodeRunner Preparing sandbox [worker #0, session #klt5k]\n',
    '2023-08-09T12:04:03.152Z workers Started run worker instance (delayed) #0\n',
    '2023-08-09T12:04:03.152Z nodeRunner Prepared sandbox [worker #0, session #klt5k]\n',
    '2023-08-09T12:04:03.152Z workers [worker #0, session #klt5k] Running tests in sandbox\n',
    '2023-08-09T12:04:03.718Z workers Scheduling Vitest Run (klt5k): 2023-08-09T12:04:03.700Z\n',
    '2023-08-09T12:04:15.296Z workers [klt5k.2] Loaded unknown number of test(s)\n',
    '2023-08-09T12:04:15.296Z workers [klt5k.2] Test executed: should work\n',
    '2023-08-09T12:04:15.379Z workers [klt5k.3] Loaded unknown number of test(s)\n',
    '2023-08-09T12:04:15.469Z workers [klt5k.3] Test executed: when on objectif, it should previous to school if on edt template and not manual\n',
    '2023-08-09T12:04:16.265Z workers Sandbox (active) [klt5k] error: ReferenceError: describeonly is not defined\n' +
      '    at ./src/components/PeriodeWeekTag/tests/getPeriodeAndWeek.test.ts:70:1\n' +
      '    at VitestExecutor.runModule (file://<homeDir>/src/workspace/node_modules/.pnpm/vite-node@0.34.1_@types+node@16.18.12_terser@5.17.3/node_modules/vite-node/dist/client.mjs:341:5)\n' +
      '    at VitestExecutor.directRequest (file://<homeDir>/src/workspace/node_modules/.pnpm/vite-node@0.34.1_@types+node@16.18.12_terser@5.17.3/node_modules/vite-node/dist/client.mjs:325:5)\n' +
      '    at VitestExecutor.cachedRequest (file://<homeDir>/src/workspace/node_modules/.pnpm/vite-node@0.34.1_@types+node@16.18.12_terser@5.17.3/node_modules/vite-node/dist/client.mjs:188:14)\n' +
      '    at VitestExecutor.executeId (file://<homeDir>/src/workspace/node_modules/.pnpm/vite-node@0.34.1_@types+node@16.18.12_terser@5.17.3/node_modules/vite-node/dist/client.mjs:164:12)\n' +
      '    at collectTests (file://<homeDir>/src/workspace/node_modules/.pnpm/@vitest+runner@0.34.1/node_modules/@vitest/runner/dist/index.js:447:7)\n' +
      '    at startTests (file://<homeDir>/src/workspace/node_modules/.pnpm/@vitest+runner@0.34.1/node_modules/@vitest/runner/dist/index.js:765:17)\n' +
      '    at file://<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/entry.js:99:7\n' +
      '    at withEnv (file://<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/entry.js:69:5)\n' +
      '    at run (file://<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/entry.js:91:3)\n' +
      '    at run (file://<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/worker.js:81:5)\n' +
      '    at file://<homeDir>/src/workspace/node_modules/.pnpm/tinypool@0.7.0/node_modules/tinypool/dist/esm/worker.js:109:20\n',
    '2023-08-09T12:04:16.305Z workers [klt5k.1] Loaded unknown number of test(s)\n',
    '2023-08-09T12:04:16.330Z workers Vitest Run Complete (klt5k): 2023-08-09T12:04:16.306Z\n',
    '2023-08-09T12:04:16.341Z workers [klt5k] Run 2 test(s), skipped 0 test(s)\n',
    '2023-08-09T12:04:16.343Z workers [klt5k] Sandbox is responsive, closing it\n',
    '2023-08-09T12:04:16.347Z project Test run finished\n',
    '2023-08-09T12:04:16.348Z project Processed console.log entries\n',
    '2023-08-09T12:04:16.348Z project Processed loading sequences\n',
    '2023-08-09T12:04:16.349Z project Processed executed tests\n',
    '2023-08-09T12:04:16.356Z project Processed code coverage\n',
    '2023-08-09T12:04:16.387Z project Test run result processed and sent to IDE\n',
    '2023-08-09T12:05:30.598Z fs File changed in editor: src/components/PeriodeWeekTag/getPeriodeAndWeek.ts\n',
    '2023-08-09T12:05:30.598Z extended-core New file or complex file change\n',
    '2023-08-09T12:05:30.599Z project Test run is not cancelled because cancel requester does not have enough priority to cancel the run\n',
    '2023-08-09T12:05:30.614Z project Test run started; run priority: 2\n',
    '2023-08-09T12:05:30.615Z testTask Test files from affected: 0, from deleted or manually requested: 0, from recently changed: 0, from loaded by: 0, from failing: 0\n',
    '2023-08-09T12:05:30.615Z testTask Running only selected or not excluded tests\n',
    '2023-08-09T12:05:30.658Z workers Starting test run, priority: 2\n',
    '2023-08-09T12:05:30.658Z nodeRunner Starting sandbox [worker #0, session #c2vbg]\n',
    '2023-08-09T12:05:30.658Z nodeRunner Preparing sandbox [worker #0, session #c2vbg]\n',
    '2023-08-09T12:05:30.658Z nodeRunner Prepared sandbox [worker #0, session #c2vbg]\n',
    '2023-08-09T12:05:30.658Z workers [worker #0, session #c2vbg] Running tests in sandbox\n',
    '2023-08-09T12:05:30.676Z workers Scheduling Vitest Run (c2vbg): 2023-08-09T12:05:30.671Z\n',
    '2023-08-09T12:05:31.017Z fs File changed in editor: src/components/PeriodeWeekTag/getPeriodeAndWeek.ts\n',
    '2023-08-09T12:05:31.019Z workers Cancelling test run, cancel requester priority: 2, current run priority: 2\n',
    '2023-08-09T12:05:31.019Z project Test run was cancelled\n',
    '2023-08-09T12:05:31.020Z workers [c2vbg] Sandbox is responsive, closing it\n',
    '2023-08-09T12:05:31.021Z project Test run cancelled, re-queueing run data\n',
    '2023-08-09T12:05:31.021Z project Test run finished\n',
    '2023-08-09T12:05:31.021Z project Test run data re-queued\n',
    '2023-08-09T12:05:31.074Z project Test run started; run priority: 2\n',
    '2023-08-09T12:05:31.074Z testTask Test files from affected: 0, from deleted or manually requested: 0, from recently changed: 0, from loaded by: 0, from failing: 0\n',
    '2023-08-09T12:05:31.074Z testTask Running only selected or not excluded tests\n',
    '2023-08-09T12:05:31.096Z workers Starting test run, priority: 2\n',
    '2023-08-09T12:05:31.096Z nodeRunner Starting sandbox [worker #0, session #w8i4j]\n',
    '2023-08-09T12:05:31.096Z nodeRunner Preparing sandbox [worker #0, session #w8i4j]\n',
    '2023-08-09T12:05:31.096Z nodeRunner Prepared sandbox [worker #0, session #w8i4j]\n',
    '2023-08-09T12:05:31.096Z workers [worker #0, session #w8i4j] Running tests in sandbox\n',
    '2023-08-09T12:05:32.723Z fs File changed in editor: src/components/PeriodeWeekTag/getPeriodeAndWeek.ts\n',
    '2023-08-09T12:05:32.724Z workers Cancelling test run, cancel requester priority: 2, current run priority: 2\n',
    '2023-08-09T12:05:32.724Z project Test run was cancelled\n',
    '2023-08-09T12:05:32.825Z workers [w8i4j] Sandbox is responsive, closing it\n',
    '2023-08-09T12:05:32.825Z project Test run cancelled, re-queueing run data\n',
    '2023-08-09T12:05:32.825Z project Test run finished\n',
    '2023-08-09T12:05:32.825Z project Test run data re-queued\n',
    '2023-08-09T12:05:32.830Z project Test run started; run priority: 2\n',
    '2023-08-09T12:05:32.830Z testTask Test files from affected: 0, from deleted or manually requested: 0, from recently changed: 0, from loaded by: 0, from failing: 0\n',
    '2023-08-09T12:05:32.830Z testTask Running only selected or not excluded tests\n',
    '2023-08-09T12:05:32.855Z workers Starting test run, priority: 2\n',
    '2023-08-09T12:05:32.855Z nodeRunner Starting sandbox [worker #0, session #wdflz]\n',
    '2023-08-09T12:05:32.855Z nodeRunner Preparing sandbox [worker #0, session #wdflz]\n',
    '2023-08-09T12:05:32.855Z nodeRunner Prepared sandbox [worker #0, session #wdflz]\n',
    '2023-08-09T12:05:32.855Z workers [worker #0, session #wdflz] Running tests in sandbox\n',
    '2023-08-09T12:05:33.119Z workers Sandbox (active) [wdflz] error: ReferenceError: describeonly is not defined\n' +
      '    at ./src/components/PeriodeWeekTag/tests/getPeriodeAndWeek.test.ts:70:1\n' +
      '    at VitestExecutor.runModule (file://<homeDir>/src/workspace/node_modules/.pnpm/vite-node@0.34.1_@types+node@16.18.12_terser@5.17.3/node_modules/vite-node/dist/client.mjs:341:5)\n' +
      '    at VitestExecutor.directRequest (file://<homeDir>/src/workspace/node_modules/.pnpm/vite-node@0.34.1_@types+node@16.18.12_terser@5.17.3/node_modules/vite-node/dist/client.mjs:325:5)\n' +
      '    at VitestExecutor.cachedRequest (file://<homeDir>/src/workspace/node_modules/.pnpm/vite-node@0.34.1_@types+node@16.18.12_terser@5.17.3/node_modules/vite-node/dist/client.mjs:188:14)\n' +
      '    at VitestExecutor.executeId (file://<homeDir>/src/workspace/node_modules/.pnpm/vite-node@0.34.1_@types+node@16.18.12_terser@5.17.3/node_modules/vite-node/dist/client.mjs:164:12)\n' +
      '    at collectTests (file://<homeDir>/src/workspace/node_modules/.pnpm/@vitest+runner@0.34.1/node_modules/@vitest/runner/dist/index.js:447:7)\n' +
      '    at startTests (file://<homeDir>/src/workspace/node_modules/.pnpm/@vitest+runner@0.34.1/node_modules/@vitest/runner/dist/index.js:765:17)\n' +
      '    at file://<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/entry.js:99:7\n' +
      '    at withEnv (file://<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/entry.js:69:5)\n' +
      '    at run (file://<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/entry.js:91:3)\n' +
      '    at run (file://<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/worker.js:81:5)\n' +
      '    at file://<homeDir>/src/workspace/node_modules/.pnpm/tinypool@0.7.0/node_modules/tinypool/dist/esm/worker.js:109:20\n',
    '2023-08-09T12:05:33.150Z workers Vitest Run Abandoned (c2vbg): 2023-08-09T12:05:33.143Z\n',
    '2023-08-09T12:05:33.150Z workers Scheduling Vitest Run (w8i4j): 2023-08-09T12:05:33.143Z\n',
    '2023-08-09T12:05:33.151Z workers Vitest Run Abandoned (w8i4j): 2023-08-09T12:05:33.143Z\n',
    '2023-08-09T12:05:33.151Z workers Scheduling Vitest Run (wdflz): 2023-08-09T12:05:33.143Z\n',
    '2023-08-09T12:05:33.220Z workers [wdflz] Run 0 test(s), skipped 0 test(s)\n',
    '2023-08-09T12:05:33.225Z workers [wdflz] Sandbox is responsive, closing it\n',
    '2023-08-09T12:05:33.226Z project Test run finished\n',
    '2023-08-09T12:05:33.227Z project Processed console.log entries\n',
    '2023-08-09T12:05:33.227Z project Processed loading sequences\n',
    '2023-08-09T12:05:33.227Z project Processed executed tests\n',
    '2023-08-09T12:05:33.227Z project Processed code coverage\n',
    '2023-08-09T12:05:33.232Z project Test run result processed and sent to IDE\n',
    '2023-08-09T12:05:33.591Z fs File changed in editor: src/components/PeriodeWeekTag/getPeriodeAndWeek.ts\n',
    '2023-08-09T12:05:33.591Z fs No changes detected for src/components/PeriodeWeekTag/getPeriodeAndWeek.ts\n',
    '2023-08-09T12:05:33.591Z extended-core File was not changed, but file markers may need to be synced\n',
    '2023-08-09T12:05:35.184Z workers Sandbox (inactive) [wdflz] error: ReferenceError: describeonly is not defined\n' +
      '    at ./src/components/PeriodeWeekTag/tests/getPeriodeAndWeek.test.ts:70:1\n' +
      '    at VitestExecutor.runModule (file://<homeDir>/src/workspace/node_modules/.pnpm/vite-node@0.34.1_@types+node@16.18.12_terser@5.17.3/node_modules/vite-node/dist/client.mjs:341:5)\n' +
      '    at VitestExecutor.directRequest (file://<homeDir>/src/workspace/node_modules/.pnpm/vite-node@0.34.1_@types+node@16.18.12_terser@5.17.3/node_modules/vite-node/dist/client.mjs:325:5)\n' +
      '    at VitestExecutor.cachedRequest (file://<homeDir>/src/workspace/node_modules/.pnpm/vite-node@0.34.1_@types+node@16.18.12_terser@5.17.3/node_modules/vite-node/dist/client.mjs:188:14)\n' +
      '    at VitestExecutor.executeId (file://<homeDir>/src/workspace/node_modules/.pnpm/vite-node@0.34.1_@types+node@16.18.12_terser@5.17.3/node_modules/vite-node/dist/client.mjs:164:12)\n' +
      '    at collectTests (file://<homeDir>/src/workspace/node_modules/.pnpm/@vitest+runner@0.34.1/node_modules/@vitest/runner/dist/index.js:447:7)\n' +
      '    at startTests (file://<homeDir>/src/workspace/node_modules/.pnpm/@vitest+runner@0.34.1/node_modules/@vitest/runner/dist/index.js:765:17)\n' +
      '    at file://<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/entry.js:99:7\n' +
      '    at withEnv (file://<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/entry.js:69:5)\n' +
      '    at run (file://<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/entry.js:91:3)\n' +
      '    at run (file://<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/worker.js:81:5)\n' +
      '    at file://<homeDir>/src/workspace/node_modules/.pnpm/tinypool@0.7.0/node_modules/tinypool/dist/esm/worker.js:109:20\n',
    '2023-08-09T12:05:37.127Z fs File changed: src/components/PeriodeWeekTag/getPeriodeAndWeek.ts\n',
    '2023-08-09T12:05:37.128Z fs No changes detected for src/components/PeriodeWeekTag/getPeriodeAndWeek.ts\n',
    '2023-08-09T12:05:37.129Z extended-core File was not changed, but file markers may need to be synced\n',
    '2023-08-09T12:07:50.274Z project Test run is not cancelled because cancel requester does not have enough priority to cancel the run\n',
    '2023-08-09T12:07:50.274Z project Requested to run all tests\n',
    '2023-08-09T12:07:50.276Z project Test run started; run priority: 3\n',
    '2023-08-09T12:07:50.276Z project Running all tests\n',
    '2023-08-09T12:07:50.300Z workers Starting test run, priority: 3\n',
    '2023-08-09T12:07:50.300Z nodeRunner Starting sandbox [worker #0, session #5iwog]\n',
    '2023-08-09T12:07:50.300Z nodeRunner Preparing sandbox [worker #0, session #5iwog]\n',
    '2023-08-09T12:07:50.300Z nodeRunner Prepared sandbox [worker #0, session #5iwog]\n',
    '2023-08-09T12:07:50.300Z workers [worker #0, session #5iwog] Running tests in sandbox\n',
    '2023-08-09T12:07:50.321Z workers Scheduling Vitest Run (5iwog): 2023-08-09T12:07:50.314Z\n',
    '2023-08-09T12:07:54.023Z workers [5iwog.4] Loaded unknown number of test(s)\n',
    '2023-08-09T12:07:54.023Z workers Sandbox (active) [5iwog] error: ReferenceError: describeonly is not defined\n' +
      '    at ./src/components/PeriodeWeekTag/tests/getPeriodeAndWeek.test.ts:70:1\n' +
      '    at VitestExecutor.runModule (file://<homeDir>/src/workspace/node_modules/.pnpm/vite-node@0.34.1_@types+node@16.18.12_terser@5.17.3/node_modules/vite-node/dist/client.mjs:341:5)\n' +
      '    at VitestExecutor.directRequest (file://<homeDir>/src/workspace/node_modules/.pnpm/vite-node@0.34.1_@types+node@16.18.12_terser@5.17.3/node_modules/vite-node/dist/client.mjs:325:5)\n' +
      '    at VitestExecutor.cachedRequest (file://<homeDir>/src/workspace/node_modules/.pnpm/vite-node@0.34.1_@types+node@16.18.12_terser@5.17.3/node_modules/vite-node/dist/client.mjs:188:14)\n' +
      '    at VitestExecutor.executeId (file://<homeDir>/src/workspace/node_modules/.pnpm/vite-node@0.34.1_@types+node@16.18.12_terser@5.17.3/node_modules/vite-node/dist/client.mjs:164:12)\n' +
      '    at collectTests (file://<homeDir>/src/workspace/node_modules/.pnpm/@vitest+runner@0.34.1/node_modules/@vitest/runner/dist/index.js:447:7)\n' +
      '    at startTests (file://<homeDir>/src/workspace/node_modules/.pnpm/@vitest+runner@0.34.1/node_modules/@vitest/runner/dist/index.js:765:17)\n' +
      '    at file://<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/entry.js:99:7\n' +
      '    at withEnv (file://<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/entry.js:69:5)\n' +
      '    at run (file://<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/entry.js:91:3)\n' +
      '    at run (file://<homeDir>/src/workspace/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.0.0_terser@5.17.3/node_modules/vitest/dist/worker.js:81:5)\n' +
      '    at file://<homeDir>/src/workspace/node_modules/.pnpm/tinypool@0.7.0/node_modules/tinypool/dist/esm/worker.js:109:20\n',
    '2023-08-09T12:07:54.024Z workers [5iwog.4] Test executed: when on objectif, it should previous to school if on edt template and not manual\n',
    '2023-08-09T12:07:54.036Z workers [5iwog.2] Loaded unknown number of test(s)\n',
    '2023-08-09T12:07:54.037Z workers [5iwog.2] Test executed: should work\n',
    '2023-08-09T12:07:54.039Z workers [5iwog.3] Loaded unknown number of test(s)\n',
    '2023-08-09T12:07:54.042Z workers [5iwog.3] Test executed: should return the next day if no working days\n',
    '2023-08-09T12:07:54.043Z workers [5iwog.3] Test executed: should return the next tuesday\n',
    '2023-08-09T12:07:54.045Z workers [5iwog.3] Test executed: should return sunday\n',
    '2023-08-09T12:07:54.048Z workers [5iwog.3] Test executed: should return thursday\n',
    '2023-08-09T12:07:54.049Z workers [5iwog.3] Test executed: should return thursday even if order of working days is fucked up\n',
    '2023-08-09T12:07:54.053Z workers [5iwog.3] Test executed: should return thursday even working days starting sundy\n',
    '2023-08-09T12:07:54.059Z workers [5iwog.3] Test executed: should return the next day if no working days\n',
    '2023-08-09T12:07:54.061Z workers [5iwog.3] Test executed: should return true wednesday is end\n',
    '2023-08-09T12:07:54.063Z workers [5iwog.3] Test executed: should return true \n',
    '2023-08-09T12:07:54.064Z workers [5iwog.3] Test executed: should return true if sunday\n',
    '2023-08-09T12:07:54.065Z workers [5iwog.3] Test executed: should return thursday even working days starting sundy\n',
    '2023-08-09T12:07:54.067Z workers [5iwog.3] Test executed: should return true\n',
    '2023-08-09T12:07:54.069Z workers [5iwog.3] Test executed: should return true if is sunday and sundayStart\n',
    '2023-08-09T12:07:54.070Z workers [5iwog.3] Test executed: should return false if is sunday and not sundayStart\n',
    '2023-08-09T12:07:54.071Z workers [5iwog.3] Test executed: should return the next day ifano working days\n',
    '2023-08-09T12:07:54.073Z workers [5iwog.1] Loaded unknown number of test(s)\n',
    '2023-08-09T12:07:54.073Z workers [5iwog.3] Test executed: should return the previous monday\n',
    '2023-08-09T12:07:54.076Z workers [5iwog.3] Test executed: should return sunday\n',
    '2023-08-09T12:07:54.078Z workers [5iwog.3] Test executed: should return wednesday\n',
    '2023-08-09T12:07:54.079Z workers [5iwog.3] Test executed: should return wednesday even if workingDays order is fuckedup\n',
    '2023-08-09T12:07:54.080Z workers [5iwog.3] Test executed: should work\n',
    '2023-08-09T12:07:54.083Z workers [5iwog.3] Test executed: should work\n',
    '2023-08-09T12:07:54.084Z workers [5iwog.3] Test executed: should work\n',
    '2023-08-09T12:07:54.086Z workers [5iwog.3] Test executed: should work\n',
    '2023-08-09T12:07:54.123Z workers [5iwog] Run 25 test(s), skipped 0 test(s)\n',
    '2023-08-09T12:07:54.139Z workers Vitest Run Complete (5iwog): 2023-08-09T12:07:54.086Z\n',
    '2023-08-09T12:07:54.149Z workers [5iwog] Sandbox is responsive, closing it\n',
    '2023-08-09T12:07:54.154Z project Test run finished\n',
    '2023-08-09T12:07:54.154Z project Processed console.log entries\n',
    '2023-08-09T12:07:54.155Z project Processed loading sequences\n',
    '2023-08-09T12:07:54.155Z project Test name duplicate: should work\n',
    '2023-08-09T12:07:54.155Z project Test name duplicate: should work\n',
    '2023-08-09T12:07:54.155Z project Test name duplicate: should work\n',
    '2023-08-09T12:07:54.155Z project Processed executed tests\n',
    '2023-08-09T12:07:54.163Z project Processed code coverage\n',
    '2023-08-09T12:07:54.192Z project Test run result processed and sent to IDE\n'
  ]
}
mburnell commented 1 year ago

Thanks for reporting the issue.

We haven't been able to determine the cause of the issue from the information provided; could you please prepare a sample repo with a similar structure that reproduces the issue?

I note that this is related to https://github.com/wallabyjs/public/issues/3248. As a part of this issue an update was made that reports the snapshot patching issue as a warning rather than an error. Is the patching failure causing you further problems?

TeaBough commented 1 year ago

Thanks for looking into this issue 🙏 Here is a basic repo that reproduce the problem : https://github.com/TeaBough/pnpm-monorepo The test in packages/main/src/simple.test.ts is running successfully but in the wallaby console I still get :

console.warn: Initialization: Wallaby is not compatible with current version of Vitest.
Could not find inlineSnapshotSaved in entry point for file file:///tmp/pnpm-monorepo/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.1.0/node_modules/vitest/dist/vendor-index.9378c9a4.js.
console.warn: Initialization: Wallaby is not compatible with current version of Vitest.
Could not find if (hasSnapshot && this._updateSnapshot === "all" ||  in entry point for file file:///tmp/pnpm-monorepo/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.1.0/node_modules/vitest/dist/vendor-index.9378c9a4.js.
console.warn: Initialization: Wallaby is not compatible with current version of Vitest.
Could not find this._updateSnapshot = options.updateSnapshot; in entry point for file file:///tmp/pnpm-monorepo/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.1.0/node_modules/vitest/dist/vendor-index.9378c9a4.js.
console.warn: Initialization: Wallaby is not compatible with current version of Vitest.
Could not find if (this._updateSnapshot === "all" && this._uncheckedKeys.size) { in entry point for file file:///tmp/pnpm-monorepo/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.1.0/node_modules/vitest/dist/vendor-index.9378c9a4.js.
console.warn: Initialization: Wallaby is not compatible with current version of Vitest.
Could not find if (hasSnapshot && this._updateSnapshot === "all" || (!hasSnapshot || !snapshotIsPersisted) && (this._updateSnapshot === "new" || this._updateSnapshot === "all")) { in entry point for file file:///tmp/pnpm-monorepo/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.1.0/node_modules/vitest/dist/vendor-index.9378c9a4.js.
console.warn: Initialization: Wallaby is not compatible with current version of Vitest.
Could not find getSnapshotState in entry point for file file:///tmp/pnpm-monorepo/node_modules/.pnpm/vitest@0.34.1_@vitest+ui@0.34.1_jsdom@22.1.0/node_modules/vitest/dist/vendor-index.9378c9a4.js.
mburnell commented 1 year ago

Thanks for the repo; we were able to reproduce the issue.

The underlying cause here is that pnpm won't create symlinks for transitive dependencies (by default, by design). This doesn't interfere with packages such as vitest referring to their own transitive dependencies, but does interfere with Wallaby, which needs to refer to them directly. There are a few ways to resolve this, but the one we're recommending is to add the following lines to your .npmrc file:

public-hoist-pattern[]=*vitest*
public-hoist-pattern[]=vite-node

We've updated our documentation to include this information: using vitest with pnpm.

We noticed you had explicitly included a couple of vitest's transitive dependencies in your main/package.json; the config change described above should make this unnecessary.

TeaBough commented 1 year ago

Thx it's working now 👍