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

Support Request: VSCode suddenly can't find any tests #2880

Closed
chris-decker-gantri opened this issue Dec 14, 2021 · 16 comments
Closed

Support Request: VSCode suddenly can't find any tests #2880

chris-decker-gantri opened this issue Dec 14, 2021 · 16 comments

Comments

@chris-decker-gantri
Copy link

Issue description or question

My project in VSCode is suddenly unable to find any tests when Wallaby was working previously without issue. It just says ‌0 failing tests, 0 passing with no other logs.

Environment:

  • VSCode
  • Jest
  • TypeScript

Steps taken to attempt to resolve:

  • Reset Wallaby cache
  • Force core update
  • Change configuration from project to directory
  • Delete node_modules and package-lock, then re-install node modules.
  • Remove and re-install Wallaby extension
  • Revert to older version of Wallaby extension

What does work:

  • Running tests in the command line with Jest
  • Running Wallaby on other projects

Wallaby diagnostics report

{
  editorVersion: '1.63.1',
  pluginVersion: '1.0.322',
  editorType: 'VSCode',
  osVersion: 'darwin 21.1.0',
  nodeVersion: 'v14.16.1',
  coreVersion: '1.0.1193',
  checksum: 'Nzg1YzQ2NzRlZWEyNmI0NDNlYTk0YjYyN2E4YTUxMjQsMTY2MDY5NDQwMDAwMCww',
  config: {
    diagnostics: {
      jest: {
        config: {
          configs: [
            {
              automock: false,
              cache: true,
              cacheDirectory: '/private/var/folders/fz/q3ylr_fs1qq1xnhng8dj1c_h0000gn/T/jest_dx',
              clearMocks: false,
              coveragePathIgnorePatterns: [ '/node_modules/' ],
              cwd: '<homeDir>/Documents/<sensitive_directory_name>/github/Core',
              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' ],
              moduleFileExtensions: [
                'web.js',  'js',
                'web.ts',  'ts',
                'web.tsx', 'tsx',
                'json',    'web.jsx',
                'jsx',     'node'
              ],
              moduleLoader: undefined,
              moduleNameMapper: [ [ '^react-native$', 'react-native-web' ], [ '^.+\\.module\\.(css|sass|scss)$', 'identity-obj-proxy' ] ],
              modulePathIgnorePatterns: [],
              modulePaths: [],
              name: 'a162c47264846d342210d0339f6b112f',
              prettierPath: 'prettier',
              resetMocks: true,
              resetModules: false,
              resolver: undefined,
              restoreMocks: false,
              rootDir: '<homeDir>/Documents/<sensitive_directory_name>/github/Core',
              roots: [ '<homeDir>/Documents/<sensitive_directory_name>/github/Core/src' ],
              runner: 'jest-runner',
              setupFiles: [ '<homeDir>/Documents/<sensitive_directory_name>/github/Core/node_modules/react-app-polyfill/jsdom.js' ],
              setupFilesAfterEnv: [ '<homeDir>/Documents/<sensitive_directory_name>/github/Core/src/setupTests.ts' ],
              skipFilter: false,
              skipNodeResolution: undefined,
              slowTestThreshold: 5,
              snapshotResolver: undefined,
              snapshotSerializers: [],
              testEnvironment: '<homeDir>/Documents/<sensitive_directory_name>/github/Core/node_modules/jest-environment-jsdom/build/index.js',
              testEnvironmentOptions: {},
              testLocationInResults: false,
              testMatch: [
                '<homeDir>/Documents/<sensitive_directory_name>/github/Core/src/**/__tests__/**/*.{js,jsx,ts,tsx}',
                '<homeDir>/Documents/<sensitive_directory_name>/github/Core/src/**/*.{spec,test}.{js,jsx,ts,tsx}'
              ],
              testPathIgnorePatterns: [ '/node_modules/' ],
              testRegex: [],
              testRunner: '<homeDir>/Documents/<sensitive_directory_name>/github/Core/node_modules/jest-circus/runner.js',
              testURL: 'http://localhost',
              timers: 'real',
              transform: [
                [ '^.+\\.(js|jsx|mjs|cjs|ts|tsx)$', '<homeDir>/Documents/<sensitive_directory_name>/github/Core/node_modules/react-scripts/config/jest/babelTransform.js', {} ],
                [ '^.+\\.css$', '<homeDir>/Documents/<sensitive_directory_name>/github/Core/node_modules/react-scripts/config/jest/cssTransform.js', {} ],
                [ '^(?!.*\\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)', '<homeDir>/Documents/<sensitive_directory_name>/github/Core/node_modules/react-scripts/config/jest/fileTransform.js', {} ]
              ],
              transformIgnorePatterns: [ '[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$', '^.+\\.module\\.(css|sass|scss)$' ],
              unmockedModulePathPatterns: undefined,
              watchPathIgnorePatterns: []
            }
          ],
          globalConfig: {
            bail: 0,
            changedFilesWithAncestor: false,
            changedSince: undefined,
            collectCoverage: false,
            collectCoverageFrom: [ 'src/**/*.{js,jsx,ts,tsx}', '!src/**/*.d.ts' ],
            collectCoverageOnlyFrom: undefined,
            coverageDirectory: '<homeDir>/Documents/<sensitive_directory_name>/github/Core/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: 9,
            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>/Documents/<sensitive_directory_name>/github/Core',
            runTestsByPath: false,
            silent: undefined,
            skipFilter: false,
            testFailureExitCode: 1,
            testNamePattern: undefined,
            testPathPattern: '',
            testResultsProcessor: undefined,
            testSequencer: '<homeDir>/Documents/<sensitive_directory_name>/github/Core/node_modules/@jest/test-sequencer/build/index.js',
            testTimeout: undefined,
            updateSnapshot: 'new',
            useStderr: false,
            verbose: undefined,
            watch: false,
            watchAll: false,
            watchPlugins: [
              { config: {}, path: '<homeDir>/Documents/<sensitive_directory_name>/github/Core/node_modules/jest-watch-typeahead/filename.js' },
              { config: {}, path: '<homeDir>/Documents/<sensitive_directory_name>/github/Core/node_modules/jest-watch-typeahead/testname.js' }
            ],
            watchman: true
          },
          hasDeprecationWarnings: false,
          wallaby: {
            roots: [ '<homeDir>/Documents/<sensitive_directory_name>/github/Core/src' ],
            watchPathIgnorePatterns: [
              '/node_modules/',
              '\\./dist/|\\./build/|\\./coverage/|\\./git/|/\\..+/',
              '/private/var/folders/fz/q3ylr_fs1qq1xnhng8dj1c_h0000gn/T/jest_dx',
              '<homeDir>/Documents/<sensitive_directory_name>/github/Core/coverage'
            ],
            testPathIgnorePatterns: [
              '/node_modules/',
              '\\./dist/|\\./build/|\\./coverage/|\\./git/|/\\..+/',
              '/private/var/folders/fz/q3ylr_fs1qq1xnhng8dj1c_h0000gn/T/jest_dx',
              '<homeDir>/Documents/<sensitive_directory_name>/github/Core/coverage'
            ],
            testMatch: [
              '<homeDir>/Documents/<sensitive_directory_name>/github/Core/src/**/__tests__/**/*.{js,jsx,ts,tsx}',
              '<homeDir>/Documents/<sensitive_directory_name>/github/Core/src/**/*.{spec,test}.{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: [ 'src/**/*.{js,jsx,ts,tsx}', '!src/**/*.d.ts' ],
    filesWithNoCoverageCalculated: [],
    globalSetup: false,
    micromatch: true,
    files: [
      { pattern: '/node_modules/', regexp: /\/node_modules\//, ignore: true, trigger: true, load: true },
      { pattern: '\\./dist/|\\./build/|\\./coverage/|\\./git/|/\\..+/', regexp: /\.\/dist\/|\.\/build\/|\.\/coverage\/|\.\/git\/|\/\..+\//, ignore: true, trigger: true, load: true },
      {
        pattern: '/private/var/folders/fz/q3ylr_fs1qq1xnhng8dj1c_h0000gn/T/jest_dx',
        regexp: /\/private\/var\/folders\/fz\/q3ylr_fs1qq1xnhng8dj1c_h0000gn\/T\/jest_dx/,
        ignore: true,
        trigger: true,
        load: true
      },
      {
        pattern: '<homeDir>/Documents/<sensitive_directory_name>/github/Core/coverage',
        regexp: /\/Users\/chris-decker\/Documents\/<sensitive_directory_name>\/github\/Core\/coverage/,
        ignore: true,
        trigger: true,
        load: true
      },
      { pattern: '**/**', ignore: false, trigger: true, load: true, order: 1 },
      { pattern: 'Users/chris-decker/Documents/<sensitive_directory_name>/github/Core/src/**', ignore: false, trigger: true, load: true, order: 2 },
      { pattern: 'Users/chris-decker/Documents/<sensitive_directory_name>/github/Core/src/**/__tests__/**/*.{js,jsx,ts,tsx}', ignore: true, trigger: true, load: true },
      { pattern: 'Users/chris-decker/Documents/<sensitive_directory_name>/github/Core/src/**/*.{spec,test}.{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/|\\./git/|/\\..+/',
        regexp: /\.\/dist\/|\.\/build\/|\.\/coverage\/|\.\/git\/|\/\..+\//,
        ignore: true,
        trigger: true,
        load: true,
        test: true
      },
      {
        pattern: '/private/var/folders/fz/q3ylr_fs1qq1xnhng8dj1c_h0000gn/T/jest_dx',
        regexp: /\/private\/var\/folders\/fz\/q3ylr_fs1qq1xnhng8dj1c_h0000gn\/T\/jest_dx/,
        ignore: true,
        trigger: true,
        load: true,
        test: true
      },
      {
        pattern: '<homeDir>/Documents/<sensitive_directory_name>/github/Core/coverage',
        regexp: /\/Users\/chris-decker\/Documents\/<sensitive_directory_name>\/github\/Core\/coverage/,
        ignore: true,
        trigger: true,
        load: true,
        test: true
      },
      { pattern: 'Users/chris-decker/Documents/<sensitive_directory_name>/github/Core/src/**/__tests__/**/*.{js,jsx,ts,tsx}', ignore: false, trigger: true, load: true, test: true, order: 3 },
      { pattern: 'Users/chris-decker/Documents/<sensitive_directory_name>/github/Core/src/**/*.{spec,test}.{js,jsx,ts,tsx}', ignore: false, trigger: true, load: true, test: true, order: 4 }
    ],
    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/v14.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#1989511127'
  },
  packageJSON: {
    dependencies: {
      '@craco/craco': '^6.2.0',
      '@firebase/app': '^0.6.29',
      '@firebase/auth': '^0.16.8',
      '@firebase/storage': '^0.6.1',
      '@nivo/bar': '^0.73.1',
      '@nivo/core': '^0.73.0',
      '@types/node': '^12.0.0',
      '@types/react': '^17.0.0',
      '@types/react-color': '^3.0.5',
      '@types/react-dom': '^17.0.0',
      axios: '^0.21.1',
      classnames: '^2.3.1',
      'craco-sass-resources-loader': '^1.1.0',
      'date-fns': '^2.23.0',
      'date-fns-timezone': '^0.1.4',
      'eslint-config-prettier': '^8.3.0',
      history: '^5.0.0',
      'immutability-helper': '^3.1.1',
      pubnub: '^4.32.1',
      'pubnub-react': '^2.1.0',
      react: '^17.0.2',
      'react-beautiful-dnd': '^13.1.0',
      'react-color': '^2.19.3',
      'react-dom': '^17.0.2',
      'react-helmet': '^6.1.0',
      'react-query': '^3.19.2',
      'react-redux': '^7.2.4',
      'react-router-dom': '^5.2.0',
      'react-scripts': '4.0.3',
      'react-table': '^7.7.0',
      'react-use': '^17.2.4',
      'reactjs-popup': '^2.0.5',
      redux: '^4.1.0',
      'redux-actions': '^2.6.5',
      'redux-localstorage-simple': '^2.4.1',
      'redux-thunk': '^2.3.0',
      sass: '^1.37.2',
      'styled-components': '^5.3.0',
      'styled-media-query': '^2.1.2',
      'universal-cookie': '^4.0.4',
      uuid: '^8.3.2',
      uuidv4: '^6.2.12',
      'web-vitals': '^1.0.1'
    },
    devDependencies: {
      '@babel/plugin-proposal-class-properties': '^7.8.3',
      '@babel/plugin-proposal-decorators': '^7.16.4',
      '@testing-library/jest-dom': '^5.16.1',
      '@testing-library/react': '^12.1.2',
      '@testing-library/user-event': '^13.5.0',
      '@types/jest': '^26.0.24',
      '@types/pubnub': '^4.29.4',
      '@types/react-router-dom': '^5.1.8',
      '@types/react-table': '^7.7.2',
      '@types/styled-components': '^5.1.18',
      '@types/uuidv4': '^5.0.0',
      'babel-plugin-macros': '^2.8.0',
      csstype: '^3.0.7',
      'del-cli': '^4.0.1',
      'jest-environment-jsdom': '^26.6.2',
      prettier: '^2.3.2',
      'prop-types': '^15.7.2',
      'ts-jest': '^26.5.6',
      typescript: '^4.5.2'
    }
  },
  fs: { numberOfFiles: 1193 },
  debug: [
    '2021-12-14T21:22:35.128Z angular/cli config Angular CLI not found.\n',
    '2021-12-14T21:22:35.328Z jest/config Detected Jest.\n',
    '2021-12-14T21:22:35.329Z jest/config Configured Jest.\n',
    '2021-12-14T21:22:35.330Z project Wallaby Node version: v14.16.1\n',
    '2021-12-14T21:22:35.330Z project Wallaby config: <homeDir>/Documents/<sensitive_directory_name>/github/core/auto.detect\n',
    '2021-12-14T21:22:35.401Z project File cache: <homeDir>/.vscode/extensions/wallabyjs.wallaby-vscode-1.0.322/projects/0f008efefbd2e9e7\n',
    '2021-12-14T21:22:35.464Z uiService Listening port 51235\n',
    '2021-12-14T21:22:35.498Z project package.json file change detected, invalidating local cache\n',
    '2021-12-14T21:22:35.524Z workers Parallelism for initial run: 8, for regular run: 4\n',
    '2021-12-14T21:22:35.524Z workers Starting run worker instance #0\n',
    '2021-12-14T21:22:35.525Z workers Starting run worker instance #1\n',
    '2021-12-14T21:22:35.525Z workers Starting run worker instance #2\n',
    '2021-12-14T21:22:35.525Z workers Starting run worker instance #3\n',
    '2021-12-14T21:22:35.525Z workers Starting run worker instance #4\n',
    '2021-12-14T21:22:35.525Z workers Starting run worker instance #5\n',
    '2021-12-14T21:22:35.525Z workers Starting run worker instance #6\n',
    '2021-12-14T21:22:35.525Z workers Starting run worker instance #7\n',
    '2021-12-14T21:22:35.525Z workers Web server is listening at 56151\n',
    '2021-12-14T21:22:35.525Z project Stopping process pool\n',
    '2021-12-14T21:22:35.525Z project File cache is up-to-date, starting full test run\n',
    '2021-12-14T21:22:35.680Z workers Started run worker instance (delayed) #0\n',
    '2021-12-14T21:22:35.688Z workers Started run worker instance (delayed) #1\n',
    '2021-12-14T21:22:35.712Z workers Started run worker instance (delayed) #2\n',
    '2021-12-14T21:22:35.712Z workers Started run worker instance (delayed) #3\n',
    '2021-12-14T21:22:35.721Z workers Started run worker instance (delayed) #4\n',
    '2021-12-14T21:22:35.742Z workers Started run worker instance (delayed) #5\n',
    '2021-12-14T21:22:35.742Z workers Started run worker instance (delayed) #6\n',
    '2021-12-14T21:22:35.742Z workers Started run worker instance (delayed) #7\n',
    '2021-12-14T21:22:35.751Z project Test run started; run priority: 3\n',
    '2021-12-14T21:22:35.752Z project Running all tests\n',
    '2021-12-14T21:22:35.755Z project Test run finished\n',
    '2021-12-14T21:22:35.755Z project Test run data re-queued\n',
    '2021-12-14T21:22:36.692Z project Test run started; run priority: 3\n',
    '2021-12-14T21:22:36.694Z project Running all tests\n',
    '2021-12-14T21:22:36.704Z project Test run finished\n',
    '2021-12-14T21:22:36.704Z project Test run data re-queued\n'
  ]
}
@smcenlly
Copy link
Member

Your diagnostics report shows that there is a problem with Wallaby determining your file paths/patterns from your jest configuration.

Could you please:

  1. Check your recent project commits and see if there has been a change to any of your dependencies or any of your jest configuration? This may be the source of your problem, and
  2. Confirm that your tests are running from the command line with npx jest.

If you're still having problems, could you please provide us with your jest configuration files?

@chris-decker-gantri
Copy link
Author

Thank you for the reply @smcenlly.

Check your recent project commits and see if there has been a change to any of your dependencies or any of your jest configuration? This may be the source of your problem, and

The only changes are from me when I setup the testing framework.

Confirm that your tests are running from the command line with npx jest.

Yes, they run in the command line just fine.

jest.setup.ts

import '@testing-library/jest-dom';

jest.config.js

/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
    preset: 'ts-jest',
    testEnvironment: 'jsdom',
    globals: {
        'ts-jest': {
            tsconfig: './tsconfig.json',
        },
    },
    moduleNameMapper: {
        '^.+\\.(css|less|scss)$': 'babel-jest',
    },
    setupFilesAfterEnv: ['./jest.setup.ts']
};

@ArtemGovorov
Copy link
Member

Thanks for sharing the details. Looks like the project folder name (replaced with <sensitive_directory_name> in your report) is causing the issue.

  • Does the name contain any non ascii characters?
  • Is <sensitive_directory_name>` a symlink?

Can you please try renaming the <sensitive_directory_name> folder to something simple like test to see if it helps? Alternatively you may clone the same repo/project to a newly named folder to test it out. If it helps, can you please send us the <sensitive_directory_name> to hello@wallabyjs.com for further troubleshooting? If you prefer not to share the name, please try bisecting it to find out what character in it is causing the issue and let us know.

@chris-decker-gantri
Copy link
Author

The directory name is just my company name. 5 English alphabet characters. No spaces or punctuation or anything. Also not a symlink. I tried renaming the directory and it started working! Reverted the name change and it still worked. No idea what the issue was. Next time I'll be sure to add restarting my computer (always a good step) and then renaming the folder to the troubleshooting steps before I reach out. Thank you for the help! I'm closing the ticket.

@chris-decker-gantri
Copy link
Author

chris-decker-gantri commented Dec 16, 2021

Unfortunately, I'm back. That fix didn't last long, and taking the same steps doesn't solve it (also tried restarting a couple times for good measure). I'm also seeing the same issue on the WebStorm IDE, although there it always fails a few tests. It appears that it's not using the mocks I've defined. Now in VSCode it seems to be giving the same failures that WebStorm is, but after the issue started up again it was giving the 0 failing tests, 0 passing message.

Again, this issue only appears on this repo and only when running Wallaby via the IDE. When running the tests for this repo via command line they all pass, and when running a different repo through Wallaby in VSCode or WebStorm, they both pass.

@chris-decker-gantri
Copy link
Author

VSCode is back to giving the 0 failing tests, 0 passing message. WebStorm is still showing failing tests due to not using the mocks I've defined.

@ArtemGovorov
Copy link
Member

  • Can you please try cloning and running Wallaby in https://github.com/wallabyjs/wallaby-2880 (it has your project's setup files and dependencies) to see if it's working for you?
  • Can you also try running npx jest --clearCache in the repo's root to see if it changes anything?

@chris-decker-gantri
Copy link
Author

Yes, it worked just fine.

  • Can you also try running npx jest --clearCache in the repo's root to see if it changes anything?

No change.

@ArtemGovorov
Copy link
Member

Yes, it worked just fine.

It definitely looks like the issue is related to either the project's path (because the sample repo has the config and dependencies exactly like in your project). Can you try re-naming the cloned sample repo folder to use the same name/path as <homeDir>/Documents/<sensitive_directory_name>/github/Core to see if it makes it stop working?

Another thing I'd try is to clone your project's repo to some other folder closer to the disk root, such as <homeDir>/Documents/test to see if it helps.

@chris-decker-gantri
Copy link
Author

Can you try re-naming the cloned sample repo folder to use the same name/path as /Documents/<sensitive_directory_name>/github/Core to see if it makes it stop working?

It did stop working. However, I tried renaming the test repo folder from Core to core, and it started working! Unfortunately, doing the same thing with the original repo does not fix it. I'm once again getting the behavior where it can't seem to find my mocks.

Another thing I'd try is to clone your project's repo to some other folder closer to the disk root, such as /Documents/test to see if it helps.

I'm getting the same behavior as above where it can't seem to find the mocks. Any tests that don't rely on the mocks pass, but any that do fail.

@smcenlly
Copy link
Member

You mentioned:

I tried renaming the test repo folder from Core to core, and it started working!

and also

Unfortunately, doing the same thing with the original repo does not fix it.

We had seen something similar in the past when changing the casing of an existing file (e.g. changing from upper case to lower case). The file path wouldn't update correctly in source control, but would update on disk. This then led to a range of strange issues with compilation, running tests, etc. The behavior of existing vs. fresh clone would also be different at that point.


Could you please check your import/require path casing matches what exists on disk? You may need to run npx jest --clearCache from the CLI and VS Code's Wallaby.js: Reset Wallaby Cache command after fixing any problems.

@chris-decker-gantri
Copy link
Author

Could you please check your import/require path casing matches what exists on disk?

I do not have any paths that reference that directory since it is the root level for the repo. I also didn't rename anything until you requested I do so, so I don't see casing causing the issue.

You may need to run npx jest --clearCache from the CLI and VS Code's Wallaby.js: Reset Wallaby Cache command after fixing any problems.

I've been running these during every troubleshooting update without success.

@smcenlly
Copy link
Member

Are you able to provide us with a sample of your repo so we can see your project structure and try to reproduce the problem ourselves?

Obviously you may have some sensitive/proprietary code in your project that you're unable to share, we would suggest taking a copy of your project, removing any source control folders, and then removing code until you're left with project configuration and a sample file/sample test where you can reproduce the problem (no actual production code except for project structure and test configuration).

You may email the sample to us: hello@wallabyjs.com

@chris-decker-gantri
Copy link
Author

@smcenlly I've created a public example repo here: https://github.com/chris-decker-gantri/wallaby

@smcenlly
Copy link
Member

Thanks so much for providing the sample repo. We were able to reproduce your problem and identify what was going wrong.

Your project has react-scripts as a dependency but no longer uses react-scripts to run your tests. Because react-scripts is only meant to exist for create-react-app applications (it is removed automatically if you eject), Wallaby will automatically use react-scripts for your jest configuration if/when it exists in a project.

We have updated Wallaby to handle your project's scenario (where you have react-scripts but do not use it) but unless we're missing something, you should also be able to safely remove this dependency.

Please update to Wallaby core v1.0.1203, it should fix your problem.

@chris-decker-gantri
Copy link
Author

It works! Thank you SO much @smcenlly (and team)! It's hard to imagine writing tests without Wallaby, and that's currently my chief responsibility. I appreciate you taking the time to support us and the speed with which you push out hot fixes!

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

No branches or pull requests

3 participants