Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic configuration not working with Yarn PNP & Jest Circus in VS Code #2712

Closed
flegall opened this issue May 24, 2021 · 1 comment
Closed

Comments

@flegall
Copy link

flegall commented May 24, 2021

Issue description or question

Hi !

I'm facing an issue when running WallabyJS auto configuration
image
image

Wallaby doesn't launch, when looking at the Wallaby.js Console: there are some resolution errors (see below).

I've tried running VS Code withJEST_CIRCUS=1environment variable, I'm having a bit different errors.

Is this setup supported ?

Regards,

Reproduction repository

You can reproduce it by cloning https://github.com/flegall/wallaby-try-pnp

Logs

When running autoconfiguration without JEST_CIRCUS variable :

‍[Info]  Started Wallaby.js Core v1.0.1076
[Info]  console.log: Jest: FAIL javascript/demo/factorial.unit.ts
[Info]  console.log: Jest:   ● Test suite failed to run
[Info]      Qualified path resolution failed - none of the candidates can be found on the disk.
[Info]      Source path: /Users/florent.legall/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js
[Info]      Rejected candidate: /Users/florent.legall/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js
[Info]      Rejected candidate: /Users/florent.legall/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.js
[Info]      Rejected candidate: /Users/florent.legall/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.json
[Info]      Rejected candidate: /Users/florent.legall/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.node
[Info]      Rejected candidate: /Users/florent.legall/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.jsx
[Info]      Rejected candidate: /Users/florent.legall/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.es
[Info]      Rejected candidate: /Users/florent.legall/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.es6
[Info]      Rejected candidate: /Users/florent.legall/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.es7
[Info]      Require stack:
[Info]      - /Users/florent.legall/code/wallaby-try-pnp/.yarn/cache/jest-runner-npm-26.6.3-4a4a361df8-7cac133ccf.zip/node_modules/jest-runner/build/runTest.js
[Info]      - /Users/florent.legall/code/wallaby-try-pnp/.yarn/cache/jest-runner-npm-26.6.3-4a4a361df8-7cac133ccf.zip/node_modules/jest-runner/build/index.js
[Info]      - /Users/florent.legall/code/wallaby-try-pnp/.yarn/cache/@jest-core-npm-26.6.3-9bb6c92d6b-e0d35e40fc.zip/node_modules/@jest/core/build/TestScheduler.js
[Info]      - /Users/florent.legall/code/wallaby-try-pnp/.yarn/cache/@jest-core-npm-26.6.3-9bb6c92d6b-e0d35e40fc.zip/node_modules/@jest/core/build/jest.js
[Info]      - /Users/florent.legall/code/wallaby-try-pnp/.yarn/cache/jest-npm-26.6.1-3c5e3cbae1-52c44268c7.zip/node_modules/jest/build/jest.js
[Info]      - /Users/florent.legall/code/wallaby-try-pnp/wallaby.js
[Info]        at internalTools_makeError (.pnp.js:13843:34)
[Info]        at resolveUnqualified (.pnp.js:14882:13)
[Info]        at resolveRequest (.pnp.js:14906:14)
[Info]        at Object.resolveRequest (.pnp.js:14978:26)
[Info]        at Function.external_module_.Module._resolveFilename (.pnp.js:14076:34)
[Info]        at Function.external_module_.Module._load (.pnp.js:13941:48)
[Info]        at Module.n.require (../../.vscode/extensions/wallabyjs.wallaby-vscode-1.0.292/wallabyc7d5f8/server.js:29:6939)
[Info]        at Module.n.require (../../.vscode/extensions/wallabyjs.wallaby-vscode-1.0.292/wallabyc7d5f8/server.js:29:6939)
[Error] Runtime error: Qualified path resolution failed - none of the candidates can be found on the disk. 
[Error] Source path: ./.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js 
[Error] Rejected candidate: ./.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js 
[Error] Rejected candidate: ./.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.js 
[Error] Rejected candidate: ./.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.json 
[Error] Rejected candidate: ./.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.node 
[Error] Rejected candidate: ./.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.jsx 
[Error] Rejected candidate: ./.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.es 
[Error] Rejected candidate: ./.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.es6 
[Error] Rejected candidate: ./.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.es7 
[Error] Require stack: 
[Error] - ./.yarn/cache/jest-runner-npm-26.6.3-4a4a361df8-7cac133ccf.zip/node_modules/jest-runner/build/runTest.js 
[Error] - ./.yarn/cache/jest-runner-npm-26.6.3-4a4a361df8-7cac133ccf.zip/node_modules/jest-runner/build/index.js 
[Error] - ./.yarn/cache/@jest-core-npm-26.6.3-9bb6c92d6b-e0d35e40fc.zip/node_modules/@jest/core/build/TestScheduler.js 
[Error] - ./.yarn/cache/@jest-core-npm-26.6.3-9bb6c92d6b-e0d35e40fc.zip/node_modules/@jest/core/build/jest.js 
[Error] - ./.yarn/cache/jest-npm-26.6.1-3c5e3cbae1-52c44268c7.zip/node_modules/jest/build/jest.js 
[Error] - ./wallaby.js 
[Error]     at internalTools_makeError (./.pnp.js:13843:34) 
[Error]     at resolveUnqualified (./.pnp.js:14882:13) 
[Error]     at resolveRequest (./.pnp.js:14906:14) 
[Error]     at Object.resolveRequest (./.pnp.js:14978:26) 
[Error]     at Function.external_module_.Module._resolveFilename (./.pnp.js:14076:34) 
[Error]     at Function.external_module_.Module._load (./.pnp.js:13941:48) 
[Error]     at Module.require (internal/modules/cjs/loader.js:1044:19) 
[Error]     at require (internal/modules/cjs/helpers.js:77:18) 
[Error]     at runTestInternal (./.yarn/cache/jest-runner-npm-26.6.3-4a4a361df8-7cac133ccf.zip/node_modules/jest-runner/build/runTest.js:228:9) 
[Error]     at runTest (./.yarn/cache/jest-runner-npm-26.6.3-4a4a361df8-7cac133ccf.zip/node_modules/jest-runner/build/runTest.js:472:40) 
[Error]     at ./.yarn/cache/jest-runner-npm-26.6.3-4a4a361df8-7cac133ccf.zip/node_modules/jest-runner/build/index.js:154:45 

When running vscode with JEST_CIRCUS=1 variable (eg JEST_CIRCUS=1 code .)
I have the following error :

‍[Info]  Started Wallaby.js Core v1.0.1076
[Info]  console.log: Jest: FAIL javascript/demo/factorial.unit.ts
[Info]  console.log: Jest:   ● Test suite failed to run
[Info]      ReferenceError: jasmine is not defined
[Info]        at Object.<anonymous> (../../.vscode/extensions/wallabyjs.wallaby-vscode-1.0.292/wallabyc7d5f8/runners/node/jest@24.8.0/jasmineInitializer.js:14:29)
[Error] Runtime error: ReferenceError: jasmine is not defined 
[Error]     at Runtime._execModule (./.yarn/cache/jest-runtime-npm-26.6.3-bf7a869586-5ef4ceaefb.zip/node_modules/jest-runtime/build/index.js:1299:24) 
[Error]     at Runtime._loadModule (./.yarn/cache/jest-runtime-npm-26.6.3-bf7a869586-5ef4ceaefb.zip/node_modules/jest-runtime/build/index.js:898:12) 
[Error]     at Runtime.requireModule (./.yarn/cache/jest-runtime-npm-26.6.3-bf7a869586-5ef4ceaefb.zip/node_modules/jest-runtime/build/index.js:746:10) 
[Error]     at jestAdapter (./.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:93:15) 
[Error]     at runTestInternal (./.yarn/cache/jest-runner-npm-26.6.3-4a4a361df8-7cac133ccf.zip/node_modules/jest-runner/build/runTest.js:380:16) 
[Error]     at runTest (./.yarn/cache/jest-runner-npm-26.6.3-4a4a361df8-7cac133ccf.zip/node_modules/jest-runner/build/runTest.js:472:34) 

Wallaby diagnostics report

{
  editorVersion: '1.56.2',
  pluginVersion: '1.0.292',
  editorType: 'VSCode',
  osVersion: 'darwin 20.4.0',
  nodeVersion: 'v12.16.1',
  coreVersion: '1.0.1076',
  checksum: 'NDNjNGUwN2ViNmIwMmYwZTQ2NmExZGQyNWUwYWM5ZWIsMTYyMzExMDQwMDAwMCwx',
  config: {
    diagnostics: {
      jest: {
        config: {
          configs: [
            {
              automock: false,
              cache: true,
              cacheDirectory: '/private/var/folders/pk/68xb3lxn3c7bfwl8pxvfrhyc0000gn/T/jest_dx',
              clearMocks: false,
              coveragePathIgnorePatterns: [ '/node_modules/' ],
              cwd: '<homeDir>/code/wallaby-try-pnp',
              dependencyExtractor: undefined,
              detectLeaks: undefined,
              detectOpenHandles: undefined,
              displayName: undefined,
              errorOnDeprecated: false,
              extraGlobals: [],
              filter: undefined,
              forceCoverageMatch: [],
              globalSetup: undefined,
              globalTeardown: undefined,
              globals: {},
              haste: { computeSha1: false, throwOnModuleCollision: false },
              injectGlobals: true,
              moduleDirectories: [ 'node_modules', '<homeDir>/code/wallaby-try-pnp/javascript/demo' ],
              moduleFileExtensions: [ 'tsx', 'jsx', 'ts', 'js', 'json', 'pegjs' ],
              moduleLoader: undefined,
              moduleNameMapper: [ [ '\\.(css|less)$', '<homeDir>/code/wallaby-try-pnp/build/jest/styleMock.js' ] ],
              modulePathIgnorePatterns: [],
              modulePaths: undefined,
              name: 'b840526c04732dd4dd1e2cba5b988b4b',
              prettierPath: 'prettier',
              resetMocks: false,
              resetModules: false,
              resolver: undefined,
              restoreMocks: false,
              rootDir: '<homeDir>/code/wallaby-try-pnp',
              roots: [ '<homeDir>/code/wallaby-try-pnp' ],
              runner: 'jest-runner',
              setupFiles: [ '<homeDir>/code/wallaby-try-pnp/.yarn/cache/jest-canvas-mock-npm-1.0.2-3549ccda12-d9282ffff7.zip/node_modules/jest-canvas-mock/lib/index.js' ],
              setupFilesAfterEnv: [ '<homeDir>/code/wallaby-try-pnp/build/jest/setup.js', '<homeDir>/code/wallaby-try-pnp/build/jest/setup-test.ts' ],
              skipFilter: false,
              skipNodeResolution: undefined,
              slowTestThreshold: 5,
              snapshotResolver: undefined,
              snapshotSerializers: [],
              testEnvironment: '<homeDir>/code/wallaby-try-pnp/build/jest/env.js',
              testEnvironmentOptions: {},
              testLocationInResults: false,
              testMatch: [],
              testPathIgnorePatterns: [ 'node_modules/' ],
              testRegex: [ '(/__tests__/[^acceptance]*|(\\.|/)(unit))\\.[j|t]sx?$' ],
              testRunner: '<homeDir>/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-circus/runner.js',
              testURL: 'http://localhost',
              timers: 'real',
              transform: [
                [
                  '\\.[jt]sx?$',
                  '<homeDir>/code/wallaby-try-pnp/.yarn/$$virtual/babel-jest-virtual-9f33f3a3f1/0/cache/babel-jest-npm-26.6.3-5630fee2b8-89231d00e6.zip/node_modules/babel-jest/build/index.js',
                  {}
                ]
              ],
              transformIgnorePatterns: [ '/node_modules/', '\\.pnp\\.[^\\/]+$' ],
              unmockedModulePathPatterns: undefined,
              watchPathIgnorePatterns: []
            }
          ],
          globalConfig: {
            bail: 0,
            changedFilesWithAncestor: false,
            changedSince: undefined,
            collectCoverage: false,
            collectCoverageFrom: [],
            collectCoverageOnlyFrom: undefined,
            coverageDirectory: '<homeDir>/code/wallaby-try-pnp/coverage',
            coverageProvider: 'babel',
            coverageReporters: [ 'json-summary' ],
            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: 7,
            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>/code/wallaby-try-pnp',
            runTestsByPath: false,
            silent: undefined,
            skipFilter: false,
            testFailureExitCode: 1,
            testNamePattern: undefined,
            testPathPattern: '',
            testResultsProcessor: undefined,
            testSequencer: '<homeDir>/code/wallaby-try-pnp/.yarn/cache/@jest-test-sequencer-npm-26.6.3-04c59ff624-c0c2c7917a.zip/node_modules/@jest/test-sequencer/build/index.js',
            testTimeout: undefined,
            updateSnapshot: 'new',
            useStderr: false,
            verbose: undefined,
            watch: false,
            watchAll: false,
            watchPlugins: undefined,
            watchman: true
          },
          hasDeprecationWarnings: false,
          wallaby: {
            roots: [],
            watchPathIgnorePatterns: [ '/node_modules/', '\\./dist/|\\./build/|\\./coverage/|/\\..+/', 'node_modules/' ],
            testPathIgnorePatterns: [ '/node_modules/', '\\./dist/|\\./build/|\\./coverage/|/\\..+/', 'node_modules/' ],
            testMatch: [],
            testRegex: [ '(/__tests__/[^acceptance]*|(\\.|/)(unit))\\.[j|t]sx?$' ]
          }
        }
      }
    },
    testFramework: { version: 'jest@24.8.0', configurator: 'jest@24.8.0', reporter: 'jest@24.8.0', starter: 'jest@24.8.0', autoDetected: true },
    filesWithCoverageCalculated: [],
    filesWithNoCoverageCalculated: [],
    globalSetup: false,
    micromatch: true,
    files: [
      { pattern: '/node_modules/', regexp: /\/node_modules\//, ignore: true, trigger: true, load: true },
      { pattern: '\\./dist/|\\./build/|\\./coverage/|/\\..+/', regexp: /\.\/dist\/|\.\/build\/|\.\/coverage\/|\/\..+\//, ignore: true, trigger: true, load: true },
      { pattern: 'node_modules/', regexp: /node_modules\//, ignore: true, trigger: true, load: true },
      { pattern: '**/**', ignore: false, trigger: true, load: true, order: 1 },
      { pattern: '(/__tests__/[^acceptance]*|(\\.|/)(unit))\\.[j|t]sx?$', regexp: /(\/__tests__\/[^acceptance]*|(\.|\/)(unit))\.[j|t]sx?$/, 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/|/\\..+/', regexp: /\.\/dist\/|\.\/build\/|\.\/coverage\/|\/\..+\//, ignore: true, trigger: true, load: true, test: true },
      { pattern: 'node_modules/', regexp: /node_modules\//, ignore: true, trigger: true, load: true, test: true },
      {
        pattern: '(/__tests__/[^acceptance]*|(\\.|/)(unit))\\.[j|t]sx?$',
        regexp: /(\/__tests__\/[^acceptance]*|(\.|\/)(unit))\.[j|t]sx?$/,
        ignore: false,
        trigger: true,
        load: true,
        test: true,
        order: 2
      }
    ],
    runAllTestsInAffectedTestFile: false,
    updateNoMoreThanOneSnapshotPerTestFileRun: false,
    addModifiedTestFileToExclusiveTestRun: true,
    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,
    mapConsoleMessagesStackTrace: false,
    extensions: {},
    env: {
      type: 'node',
      params: {},
      runner: '<homeDir>/.nvm/versions/node/v12.16.1/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#1743569197'
  },
  packageJSON: {
    dependencies: { jquery: '1.12.3', react: '16.13.0', 'react-dom': '16.13.0' },
    devDependencies: {
      '@babel/core': '7.13.14',
      '@babel/plugin-proposal-class-properties': '7.13.0',
      '@babel/plugin-proposal-private-methods': '7.13.0',
      '@babel/plugin-proposal-private-property-in-object': '7.13.0',
      '@babel/plugin-syntax-dynamic-import': '7.8.3',
      '@babel/plugin-transform-modules-commonjs': '7.13.8',
      '@babel/plugin-transform-react-jsx-source': '7.12.13',
      '@babel/plugin-transform-shorthand-properties': '7.12.13',
      '@babel/preset-env': '7.13.12',
      '@babel/preset-react': '7.13.13',
      '@babel/preset-typescript': '7.13.0',
      '@testing-library/dom': '7.29.4',
      '@testing-library/jest-dom': '5.11.6',
      '@testing-library/react': '11.2.3',
      '@testing-library/react-hooks': '3.4.1',
      '@testing-library/user-event': '12.5.0',
      '@types/jest': '^26.0.23',
      'babel-plugin-dynamic-import-node': '1.2.0',
      'babel-plugin-lodash': '3.3.2',
      'babel-plugin-preval': '3.0.1',
      handlebars: '1.3.0',
      'handlebars-jest': '0.5.0',
      jest: '26.6.1',
      'jest-canvas-mock': '1.0.2',
      'jest-circus': '26.6.1',
      'jest-environment-jsdom': '26.6.1',
      'jest-serializer-html': '5.0.0',
      'jest-watcher': '26.6.1',
      'react-test-renderer': '16.13.0',
      typescript: '4.1.2'
    }
  },
  fs: { numberOfFiles: 13 },
  debug: [
    '2021-05-24T12:15:18.557Z angular/cli config Angular CLI not found.\n',
    '2021-05-24T12:15:18.641Z jest/config Detected Jest.\n',
    '2021-05-24T12:15:18.641Z jest/config Configured Jest.\n',
    '2021-05-24T12:15:18.643Z project Wallaby Node version: v12.16.1\n',
    '2021-05-24T12:15:18.643Z project Wallaby config: <homeDir>/code/wallaby-try-pnp/auto.detect\n',
    '2021-05-24T12:15:18.684Z project File cache: <homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.292/projects/965c6a74d4f199b0\n',
    '2021-05-24T12:15:18.777Z uiService Listening port 51235\n',
    '2021-05-24T12:15:18.786Z workers Parallelism for initial run: 6, for regular run: 3\n',
    '2021-05-24T12:15:18.786Z workers Starting run worker instance #0\n',
    '2021-05-24T12:15:18.786Z workers Starting run worker instance #1\n',
    '2021-05-24T12:15:18.787Z workers Starting run worker instance #2\n',
    '2021-05-24T12:15:18.787Z workers Starting run worker instance #3\n',
    '2021-05-24T12:15:18.787Z workers Starting run worker instance #4\n',
    '2021-05-24T12:15:18.787Z workers Starting run worker instance #5\n',
    '2021-05-24T12:15:18.787Z workers Web server is listening at 57582\n',
    '2021-05-24T12:15:18.787Z project File cache requires some updates, waiting required files from IDE\n',
    '2021-05-24T12:15:18.885Z project Stopping process pool\n',
    '2021-05-24T12:15:18.893Z project Test run started; run priority: 3\n',
    '2021-05-24T12:15:18.894Z project Running all tests\n',
    '2021-05-24T12:15:18.895Z workers Starting test run, priority: 3\n',
    '2021-05-24T12:15:18.896Z nodeRunner Starting sandbox [worker #0, session #scawa]\n',
    '2021-05-24T12:15:18.896Z nodeRunner Preparing sandbox [worker #0, session #scawa]\n',
    '2021-05-24T12:15:19.277Z workers Started run worker instance (delayed) #2\n',
    '2021-05-24T12:15:19.286Z workers Started run worker instance (delayed) #1\n',
    '2021-05-24T12:15:19.293Z workers Started run worker instance (delayed) #0\n',
    '2021-05-24T12:15:19.293Z nodeRunner Prepared sandbox [worker #0, session #scawa]\n',
    '2021-05-24T12:15:19.293Z workers [worker #0, session #scawa] Running tests in sandbox\n',
    '2021-05-24T12:15:19.294Z workers Started run worker instance (delayed) #3\n',
    '2021-05-24T12:15:19.307Z workers Started run worker instance (delayed) #4\n',
    '2021-05-24T12:15:19.355Z workers Started run worker instance (delayed) #5\n',
    '2021-05-24T12:15:19.722Z workers Scheduling Jest Test Run (scawa): 2021-05-24T12:15:19.649Z\n',
    '2021-05-24T12:15:19.724Z workers Sandbox (active) [scawa] error: Qualified path resolution failed - none of the candidates can be found on the disk.\n' +
      '\n' +
      'Source path: <homeDir>/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js\n' +
      'Rejected candidate: <homeDir>/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js\n' +
      'Rejected candidate: <homeDir>/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.js\n' +
      'Rejected candidate: <homeDir>/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.json\n' +
      'Rejected candidate: <homeDir>/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.node\n' +
      'Rejected candidate: <homeDir>/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.jsx\n' +
      'Rejected candidate: <homeDir>/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.es\n' +
      'Rejected candidate: <homeDir>/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.es6\n' +
      'Rejected candidate: <homeDir>/code/wallaby-try-pnp/.yarn/cache/jest-circus-npm-26.6.1-296de3b635-6fb1d590a2.zip/node_modules/jest-jasmine2/build/index.js.es7\n' +
      '\n' +
      'Require stack:\n' +
      '- <homeDir>/code/wallaby-try-pnp/.yarn/cache/jest-runner-npm-26.6.3-4a4a361df8-7cac133ccf.zip/node_modules/jest-runner/build/runTest.js\n' +
      '- <homeDir>/code/wallaby-try-pnp/.yarn/cache/jest-runner-npm-26.6.3-4a4a361df8-7cac133ccf.zip/node_modules/jest-runner/build/index.js\n' +
      '- <homeDir>/code/wallaby-try-pnp/.yarn/cache/@jest-core-npm-26.6.3-9bb6c92d6b-e0d35e40fc.zip/node_modules/@jest/core/build/TestScheduler.js\n' +
      '- <homeDir>/code/wallaby-try-pnp/.yarn/cache/@jest-core-npm-26.6.3-9bb6c92d6b-e0d35e40fc.zip/node_modules/@jest/core/build/jest.js\n' +
      '- <homeDir>/code/wallaby-try-pnp/.yarn/cache/jest-npm-26.6.1-3c5e3cbae1-52c44268c7.zip/node_modules/jest/build/jest.js\n' +
      '- <homeDir>/code/wallaby-try-pnp/wallaby.js\n',
    '2021-05-24T12:15:19.725Z workers [scawa] Run 0 test(s), skipped 0 test(s)\n',
    '2021-05-24T12:15:19.725Z workers Jest Test Run Complete (scawa): 2021-05-24T12:15:19.721Z\n',
    '2021-05-24T12:15:19.726Z workers [scawa] Sandbox is responsive, closing it\n',
    '2021-05-24T12:15:19.728Z project Test run finished\n',
    '2021-05-24T12:15:19.728Z project Processed console.log entries\n',
    '2021-05-24T12:15:19.728Z project Processed loading sequences\n',
    '2021-05-24T12:15:19.728Z project Processed executed tests\n',
    '2021-05-24T12:15:19.728Z project Processed code coverage\n',
    '2021-05-24T12:15:19.745Z project Test run result processed and sent to IDE\n',
    '2021-05-24T12:18:15.485Z fs No metadata for added file found: .git/FETCH_HEAD\n',
    '2021-05-24T12:18:15.642Z fs File changed: .git/FETCH_HEAD\n',
    '2021-05-24T12:18:15.642Z fs No metadata for changed file found: .git/FETCH_HEAD\n',
    '2021-05-24T12:21:20.921Z fs File changed: .git/FETCH_HEAD\n',
    '2021-05-24T12:21:20.921Z fs No metadata for changed file found: .git/FETCH_HEAD\n'
  ]
}
@smcenlly
Copy link
Member

Thanks for reporting your problem, and for the sample repo - it was a big help!

Just like jest-circus, Wallaby itself is a test runner (also true for jest-jasmine2). In Wallaby's case, we use some internals of jest-jasmine2 so it is still required as a dev dependency of your project when using Wallaby.

Wallaby would have nicely reported this to you if not for a bug it had when using jest-circus with yarn2 workspaces; this is fixed in the latest version of Wallaby core, v1.0.1077.

To fix your issue, please upgrade to the latest version of Wallaby core and add jest-jasmine2 as a dev dependency:

yarn add jest-jasmine2 --dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants