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

Create a multi-config cli runner #2970

Closed
cpojer opened this issue Feb 22, 2017 · 26 comments
Closed

Create a multi-config cli runner #2970

cpojer opened this issue Feb 22, 2017 · 26 comments

Comments

@cpojer
Copy link
Member

cpojer commented Feb 22, 2017

Right now, jest-cli is great at watching and running a single config for a single project. However, at Facebook we have many projects within one repo and we have a (bad!) internal runner that can merge configs and run them all within one run. It also doesn't support the watch mode.

We spent the past year separating modules for Jest, open sourcing more parts of our internal infra as well as rewriting Jest to support this use case in open source and bring it back in. This issue is to start the discussion as to what this may look like and how we could implement it. I can see this be implemented in two ways:

  • jest-all a package to run multiple configs within one run.
  • Expand jest-cli to accept multiple configs.

On first glance, the former seems easier than the latter. We could pull out the remaining pieces from jest-cli to make it really lightweight, separate the watch mode into a separate re-usable package and built a second test runner for the Jest testing platform. Most people will keep using jest-cli but for large companies, jest-all would become the default.

The second solution is also exciting, however. The technical challenge here is, and this was set up deliberately to execute on this specific issue, how to go from one SearchSource, TestRunner and watch mode to many SearchSources that can pass tests to one TestRunner instances and the watch mode. Basically I can see an implementation of this work that changes the architecture like this:

  • n SearchSources for n configurations that create n HasteMaps
  • TestRunner, instead of taking a config and a pair of configuration, will be refactored into the general TestRunner and an API that takes a {config, path} pair and runs those tests. The refactor is much harder than adding the ability to schedule tests with different configs within one TestRunner instance.
  • Watch mode would have to listen to many change events from different HasteMap instances. Instead of HasteMapInstance we'd operate on a Set {HasteMap1, HasteMap2, …}.

I'm curious to hear other people's opinions on what they think is the best way forward to make this happen. The end goal will be to remove our legacy internal runner and replace it with this open source piece that we are building here.

@ljharb
Copy link
Contributor

ljharb commented Feb 22, 2017

Another alternative could be moving config out of package.json into a .jestrc, and then letting the path to the config file be configurable on the command line (like eslint and many other tools do it).

@cpojer
Copy link
Member Author

cpojer commented Feb 23, 2017

That will not work for Facebook. The configurations are very different, even in the same codebase :(

@ljharb
Copy link
Contributor

ljharb commented Feb 23, 2017

I'm not sure why that wouldn't work - in any folder where you currently have a package.json config, you could also have a .jestrc, and if you wanted an alternative config in that dir, you'd do jest --config=path/to/alternate/.jestrc. Can you elaborate?

@cpojer
Copy link
Member Author

cpojer commented Feb 23, 2017

We don't have package.json files for our monorepo and some projects are a subset of others. I believe what you are proposing is orthogonal to what we are trying to accomplish here.

@ljharb
Copy link
Contributor

ljharb commented Feb 23, 2017

Wouldn't nested rc files, just like eslint, solve that? Each directory would define its own config, which would inherit from parent dirs but could override them.

@japhar81
Copy link

Typescript handles this pretty well with tsconfig.json in a sub-directory overriding the parent config. It's also relatively easy to implement, just keep searching parent paths till you find a config file. I'd be happy to take a stab at implementing if that solution would work.

@cpojer
Copy link
Member Author

cpojer commented Feb 23, 2017

@japhar81 that won't work for us because we have setups where projects are actually nested with different includes/excludes patterns. It's a bit complicated :(

@japhar81
Copy link

@cpojer do you happen to have an example you can point me at? I'm having a hard time visualizing what you mean

@ljharb
Copy link
Contributor

ljharb commented Feb 23, 2017

@cpojer even with root: true, which is an inline config signal to stop merging upwards? eslint also uses this to handle nested conflicting configs.

@cpojer
Copy link
Member Author

cpojer commented Mar 3, 2017

As discussed yesterday at our team sync, the first step to this may be how we can separate our config system from global into local configs. There are a number of global settings, like whether to collect coverage, verbose printing, number of workers etc. as well as a ton of local configs, like the roots, all haste map and ignore patterns and which transform to apply. We probably need an RFC for that first before we continue with further decisions.

@ArmorDarks
Copy link

ArmorDarks commented Mar 13, 2017

@cpojer

I think it would be great if you could show us some real examples of systems which have mentioned complications. Currently they sounds too abstract, and to be honest, even unreasonable.

Some my thoughts:

  1. Most important one. Fix damn Facebook codebase!

    Technical debt within already existing systems is very vague reason for building whole system around "solving this particular wrong often used configs". To support legacy systems always can be provided additional --legacy flag. But whole solution shouldn't be built around it.

  2. In worst case it is always possible to provide additional flags, which will implement specific, required by Facebook codebase behavior.

    Community would prefer to have normal, similar to ESLint, configs behavior and inheritance.

  3. JavaScript community already have good practices about how configs in external files and in packages.json, as well as their inheritance, should be treated. We should follow those practices, because:

    1. They are effective
    2. They are easy to understand, since they are close to what you would cognitively expect from system
    3. They are already accepted by community

    There is no need here to reinvent another bycycle or doing somethihg under inflence of fatal flaw.

    For instance, ESLint already made quite a lot in regards of this issue, and it is good example to follow.

  4. As shows example of ESLint or Stylelint, and other similar libraries, attempts to add another CLI in form of jest-all does not work out good. The reason for this, is that from users perspective the verge between regular CLI and all version is so thin, that it will often lead to confusion and unjustified complication for end-user during choosing appropriate tools for the task.

    For instance, so far it sound like jest-all can do same thing like regular CLI, so why would I use regular CLI at all, if I can plug in jest-all and just forget about it?

@mrhyde
Copy link

mrhyde commented Mar 13, 2017

No offense but this looks like another NIH case combined with legacy cancer metastasizing in open source community.
Why for god sake would you pollute open source project with solutions that cover only ONE specific use case in ONE specific company? And if you think that it's ok to do so, why then you open sourced an internal tool?

@cpojer
Copy link
Member Author

cpojer commented Mar 14, 2017

I apologize for not explaining myself better earlier and not sharing enough about this exploration. There is no legacy component that motivates solving this problem besides our internal Jest CLI which is a piece of legacy code that is hard to maintain. This issue is about offering a path forward for our internal infrastructure which isn't scaling as well and falling behind the open source version of Jest as well as open sourcing it because it may be of use to others. I'm trying to source ideas and write up what that multi-runner in open source may look like which may live inside of jest-cli or outside of it. This is undecided currently. I'm happy to listen to more ideas to make this a reality but the previous two comments seem orthogonal to the problem we attempting to solve.

To provide a more concrete use case: assume Jest's examples/ config folder. We would like to build a CLI that can run all examples in a single test run and show an aggregate coverage report for all tests that were run across projects. At Facebook it gets more complicated because we end up including the same test in multiple projects with different configs, however we can ignore that use case in the initial proof of concept.

@palmerj3
Copy link
Contributor

I love this idea. Right now I'm using a few jestrc files, npm scripts, and the jest config option. But if there was a better way to organize this and have nested configs that would be pretty fantastic.

@ArmorDarks
Copy link

@cpojer Thanks for reply!

To provide a more concrete use case: assume Jest's examples/ config folder. We would like to build a CLI that can run all examples in a single test run and show an aggregate coverage report for all tests that were run across projects. At Facebook it gets more complicated because we end up including the same test in multiple projects with different configs, however we can ignore that use case in the initial proof of concept.

Ah, finally I can clearly understand what you're trying to achieve.

#2445 doesn't interfere with this issue, since it is about discovering top level config,.

Particularly for this issue, most likely that you will need discovery features of #2445 anyway to locate top-level config (if such exists), which will tell Jest where to find all other tests and how to aggregate them.

However, my reply here #2970 (comment) (except part 1, it is obviously no longer valid) still stands. It describes established community practice about how exactly what you're describing should be done in regards of located in subdirectory examples/ configs (if there are any) and how they should be applied. One important note, that it's describing exactly configs discovery and application to nearby tests mechanism, not tests running.

I don't see how it is orthogonal to what you're describing, or your descriptions again misses some important details.

@ArmorDarks
Copy link

As a side note, while @mrhyde reply was quite harsh, I think it was justified, because your previous replies made strong impression that you were trying not to solve issue, but patch it by building whole new feature around system (Facebook's codebase) which were flawed in its core and deny all other existing solutions just because it doesn't work for Facebook codebase.

I think we all understand that compromises should be taken here, but they shouldn't serve as a basement for building new features, because this is obviously bad even for Facebook — it will just spread bad practice further instead of providing good reason to fix it.

Well, I hope that's clear my and @mrhyde replies and that it's just a result of misunderstanding.

@thymikee thymikee modified the milestone: Jest 20 Apr 21, 2017
@michael-ciniawsky
Copy link

@cpojer cosmiconfig

|– packages
|  | – 1
|  |   1.1
|  |   | |– file.js
|  |   | |– file.test.js
|  |   | |– (jest.confg.js|.jestrc|package.json)
|  |   |– file.js
|  |   |– file.test.js
|  |   |– (jest.confg.js|.jestrc|package.json)
|  | – 2*
|      |– file.js
|      |– file.test.js
|– (jest.confg.js|.jestrc|package.json) // 2* (Config Cascade)

Config

jest-config/index.js

const cosmiconfig = require('cosmiconfig');

const jestrc = cosmiconfig('jest', [options]);

module.exports = function (test) {
  jestrc.load(path.dirname(test))
     .then((result) => {
         // result.config is the parsed configuration object
         // result.filepath is the path to the config file that was found
     })
     .catch((err) => {
          // do something constructive
     });
};

Pseudo

const config = require('jest-config');

const tests = [....tests]; // test === 'path/to/file.test.js'

tests.forEach((test) => run(test, config(test)));

Usage

$ jest # :)

@michael-ciniawsky
Copy link

Config lookup after gathering all *.test.js files and tests run per file as combination of run(test, testConfig), result.filepath can be used for watching the config(s) 😛

@cpojer
Copy link
Member Author

cpojer commented Apr 21, 2017

This is happening in the next version of Jest. We discussed a bunch more stuff in the team meetings and we are currently cleaning up things.

@cpojer cpojer closed this as completed Apr 21, 2017
@lgandecki
Copy link
Contributor

lgandecki commented Jan 14, 2018

@cpojer Did this actually happen? This topic is what shows up when you google the issue, it would be great to have this conversation end with a link to an example/documentation or update on the implementation. I'm looking around but I see a lot of discussions.. like this one:
#2445

but it also ends with saying that it will happen...

basically,

root/
    project1/
        .jest.rc
        tests/
           testInBrowser.js
    project2/
        .jest.rc
        tests/
           testInNode.js

Is this possible? With .jest.rc or somehow specyfing the paths that a given context should apply to?

The moment I posted this comment, I found this: http://facebook.github.io/jest/docs/en/configuration.html#projects-array-string-projectconfig

let's see..

@SimenB
Copy link
Member

SimenB commented Jan 14, 2018

The link to the docs you provide is correct

@dan-kez
Copy link

dan-kez commented Mar 22, 2018

Quick follow up on @lgandecki's comment. I have a very similar structure in my project (with a root jest.config.js file).

Unfortunately it looks like sometimes jest wants to run tests using the nested config and sometimes without it.

e.g.
root jest.config.js

module.exports = {
  projects: [
    '<rootDir>/packages/*',
  ],
};

in packages/component-library jest.config.js

module.exports = {
  displayName: 'ComponentLibrary',
  setupTestFrameworkScriptFile: '<rootDir>/src/setupTests.js',
  snapshotSerializers: [
    'enzyme-to-json/serializer',
  ],
  moduleNameMapper: {
    '^.+\\.(css|less|scss)$': 'babel-jest',
    '\\.(svg)$': '<rootDir>/src/__mocks__/fileMock.js',
    '^Components(.*)$': '<rootDir>/src/Components$1',
    '^Constants(.*)$': '<rootDir>/src/Constants$1',
    '^Assets(.*)$': '<rootDir>/src/Assets$1',
    '^Utils(.*)$': '<rootDir>/src/Utils$1',
  },
};

running yarn jest from the root directory results in:

jest output
yarn jest
yarn run v1.4.0
$ /Users/danielkezerashvili/code/fender/node_modules/.bin/jest
 PASS  packages/leaf/src/index.test.jsx
 PASS  packages/async-leaf/src/index.test.jsx
 PASS  packages/leaf/src/index.test.jsx
 PASS  packages/async-leaf/src/index.test.jsx

 RUNS   ComponentLibrary  packages/component-library/src/Storyshots.test.js
 FAIL  packages/component-library/src/Storyshots.test.js
  ● Test suite failed to run

    Cannot find module 'Utils/Testing' from 'BreadcrumbBar.stories.jsx'

       9 |
      10 | storiesOf('Components/BreadcrumbBar', module)
    > 11 |   .addDecorator((story, context) => withInfo('common info')(story)(context))
      12 |   .addDecorator(story => wrapWithTheme(story()))
      13 |   .addDecorator(withKnobs)
      14 |   .add('Default', () => (

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:169:17)
      at Object.<anonymous> (packages/component-library/src/Components/BreadcrumbBar/stories/BreadcrumbBar.stories.jsx:11:16)


 PASS   ComponentLibrary  packages/component-library/src/Storyshots.test.js (9.539s)

Test Suites: 1 failed, 5 passed, 6 total
Tests:       56 passed, 56 total
Snapshots:   3 passed, 3 total
Time:        10.553s
Ran all test suites in 4 projects.

As you can see, the same tests are being run twice. In the case of the ComponentLibrary for one test it loads the config and the other it doesn't leading to the error.

On the other hand, jest --listTests shows the correct tests:

jest --listTests output
yarn jest --listTests
yarn run v1.4.0
$ /Users/danielkezerashvili/code/fender/node_modules/.bin/jest --listTests
/Users/danielkezerashvili/code/fender/packages/component-library/src/Storyshots.test.js
/Users/danielkezerashvili/code/fender/packages/async-leaf/src/index.test.jsx
/Users/danielkezerashvili/code/fender/packages/leaf/src/index.test.jsx
My `jest --showConfig`.
yarn run v1.4.0
$ /Users/danielkezerashvili/code/fender/node_modules/.bin/jest --no-cache --showConfig
{
  "configs": [
    {
      "automock": false,
      "browser": false,
      "cache": false,
      "cacheDirectory": "/var/folders/xr/5r2b_hb15fq__s8wmtrqgk340000gn/T/jest_dx",
      "clearMocks": false,
      "coveragePathIgnorePatterns": [
        "/node_modules/"
      ],
      "detectLeaks": false,
      "forceCoverageMatch": [],
      "globals": {},
      "haste": {
        "providesModuleNodeModules": []
      },
      "moduleDirectories": [
        "node_modules"
      ],
      "moduleFileExtensions": [
        "js",
        "json",
        "jsx",
        "node"
      ],
      "moduleNameMapper": {},
      "modulePathIgnorePatterns": [],
      "name": "fabd4cb3cee2f4502143538d3193191f",
      "resetMocks": false,
      "resetModules": false,
      "restoreMocks": false,
      "rootDir": "/Users/danielkezerashvili/code/fender/packages/async-leaf",
      "roots": [
        "/Users/danielkezerashvili/code/fender/packages/async-leaf"
      ],
      "runner": "jest-runner",
      "setupFiles": [
        "/Users/danielkezerashvili/code/fender/node_modules/regenerator-runtime/runtime.js"
      ],
      "snapshotSerializers": [],
      "testEnvironment": "jest-environment-jsdom",
      "testEnvironmentOptions": {},
      "testLocationInResults": false,
      "testMatch": [
        "**/__tests__/**/*.js?(x)",
        "**/?(*.)(spec|test).js?(x)"
      ],
      "testPathIgnorePatterns": [
        "/node_modules/"
      ],
      "testRegex": "",
      "testRunner": "/Users/danielkezerashvili/code/fender/node_modules/jest-jasmine2/build/index.js",
      "testURL": "about:blank",
      "timers": "real",
      "transform": [
        [
          "^.+\\.jsx?$",
          "/Users/danielkezerashvili/code/fender/node_modules/babel-jest/build/index.js"
        ]
      ],
      "transformIgnorePatterns": [
        "/node_modules/"
      ],
      "watchPathIgnorePatterns": []
    },
    {
      "automock": false,
      "browser": false,
      "cache": false,
      "cacheDirectory": "/var/folders/xr/5r2b_hb15fq__s8wmtrqgk340000gn/T/jest_dx",
      "clearMocks": false,
      "coveragePathIgnorePatterns": [
        "/node_modules/"
      ],
      "detectLeaks": false,
      "displayName": "ComponentLibrary",
      "forceCoverageMatch": [],
      "globals": {},
      "haste": {
        "providesModuleNodeModules": []
      },
      "moduleDirectories": [
        "node_modules"
      ],
      "moduleFileExtensions": [
        "js",
        "json",
        "jsx",
        "node"
      ],
      "moduleNameMapper": [
        [
          "^.+\\.(css|less|scss)$",
          "babel-jest"
        ],
        [
          "\\.(svg)$",
          "/Users/danielkezerashvili/code/fender/packages/component-library/src/__mocks__/fileMock.js"
        ],
        [
          "^Components(.*)$",
          "/Users/danielkezerashvili/code/fender/packages/component-library/src/Components$1"
        ],
        [
          "^Constants(.*)$",
          "/Users/danielkezerashvili/code/fender/packages/component-library/src/Constants$1"
        ],
        [
          "^Assets(.*)$",
          "/Users/danielkezerashvili/code/fender/packages/component-library/src/Assets$1"
        ],
        [
          "^Utils(.*)$",
          "/Users/danielkezerashvili/code/fender/packages/component-library/src/Utils$1"
        ]
      ],
      "modulePathIgnorePatterns": [],
      "name": "d8f256a5794f6eb5e8cd7c63f30ed870",
      "resetMocks": false,
      "resetModules": false,
      "restoreMocks": false,
      "rootDir": "/Users/danielkezerashvili/code/fender/packages/component-library",
      "roots": [
        "/Users/danielkezerashvili/code/fender/packages/component-library"
      ],
      "runner": "jest-runner",
      "setupFiles": [
        "/Users/danielkezerashvili/code/fender/node_modules/regenerator-runtime/runtime.js"
      ],
      "setupTestFrameworkScriptFile": "/Users/danielkezerashvili/code/fender/packages/component-library/src/setupTests.js",
      "snapshotSerializers": [
        "/Users/danielkezerashvili/code/fender/node_modules/enzyme-to-json/serializer.js"
      ],
      "testEnvironment": "jest-environment-jsdom",
      "testEnvironmentOptions": {},
      "testLocationInResults": false,
      "testMatch": [
        "**/__tests__/**/*.js?(x)",
        "**/?(*.)(spec|test).js?(x)"
      ],
      "testPathIgnorePatterns": [
        "/node_modules/"
      ],
      "testRegex": "",
      "testRunner": "/Users/danielkezerashvili/code/fender/node_modules/jest-jasmine2/build/index.js",
      "testURL": "about:blank",
      "timers": "real",
      "transform": [
        [
          "^.+\\.jsx?$",
          "/Users/danielkezerashvili/code/fender/node_modules/babel-jest/build/index.js"
        ]
      ],
      "transformIgnorePatterns": [
        "/node_modules/"
      ],
      "watchPathIgnorePatterns": []
    },
    {
      "automock": false,
      "browser": false,
      "cache": false,
      "cacheDirectory": "/var/folders/xr/5r2b_hb15fq__s8wmtrqgk340000gn/T/jest_dx",
      "clearMocks": false,
      "coveragePathIgnorePatterns": [
        "/node_modules/"
      ],
      "detectLeaks": false,
      "forceCoverageMatch": [],
      "globals": {},
      "haste": {
        "providesModuleNodeModules": []
      },
      "moduleDirectories": [
        "node_modules"
      ],
      "moduleFileExtensions": [
        "js",
        "json",
        "jsx",
        "node"
      ],
      "moduleNameMapper": {},
      "modulePathIgnorePatterns": [],
      "name": "13854d9fe9c3c345c9dc6c52933e83ca",
      "resetMocks": false,
      "resetModules": false,
      "restoreMocks": false,
      "rootDir": "/Users/danielkezerashvili/code/fender/packages/conductor",
      "roots": [
        "/Users/danielkezerashvili/code/fender/packages/conductor"
      ],
      "runner": "jest-runner",
      "setupFiles": [
        "/Users/danielkezerashvili/code/fender/node_modules/regenerator-runtime/runtime.js"
      ],
      "snapshotSerializers": [],
      "testEnvironment": "jest-environment-jsdom",
      "testEnvironmentOptions": {},
      "testLocationInResults": false,
      "testMatch": [
        "**/__tests__/**/*.js?(x)",
        "**/?(*.)(spec|test).js?(x)"
      ],
      "testPathIgnorePatterns": [
        "/node_modules/"
      ],
      "testRegex": "",
      "testRunner": "/Users/danielkezerashvili/code/fender/node_modules/jest-jasmine2/build/index.js",
      "testURL": "about:blank",
      "timers": "real",
      "transform": [
        [
          "^.+\\.jsx?$",
          "/Users/danielkezerashvili/code/fender/node_modules/babel-jest/build/index.js"
        ]
      ],
      "transformIgnorePatterns": [
        "/node_modules/"
      ],
      "watchPathIgnorePatterns": []
    },
    {
      "automock": false,
      "browser": false,
      "cache": false,
      "cacheDirectory": "/var/folders/xr/5r2b_hb15fq__s8wmtrqgk340000gn/T/jest_dx",
      "clearMocks": false,
      "coveragePathIgnorePatterns": [
        "/node_modules/"
      ],
      "detectLeaks": false,
      "forceCoverageMatch": [],
      "globals": {},
      "haste": {
        "providesModuleNodeModules": []
      },
      "moduleDirectories": [
        "node_modules"
      ],
      "moduleFileExtensions": [
        "js",
        "json",
        "jsx",
        "node"
      ],
      "moduleNameMapper": {},
      "modulePathIgnorePatterns": [],
      "name": "1450996632f78eada3f0b8e19a8cc772",
      "resetMocks": false,
      "resetModules": false,
      "restoreMocks": false,
      "rootDir": "/Users/danielkezerashvili/code/fender",
      "roots": [
        "/Users/danielkezerashvili/code/fender"
      ],
      "runner": "jest-runner",
      "setupFiles": [
        "/Users/danielkezerashvili/code/fender/node_modules/regenerator-runtime/runtime.js"
      ],
      "snapshotSerializers": [],
      "testEnvironment": "jest-environment-jsdom",
      "testEnvironmentOptions": {},
      "testLocationInResults": false,
      "testMatch": [
        "**/__tests__/**/*.js?(x)",
        "**/?(*.)(spec|test).js?(x)"
      ],
      "testPathIgnorePatterns": [
        "/node_modules/"
      ],
      "testRegex": "",
      "testRunner": "/Users/danielkezerashvili/code/fender/node_modules/jest-jasmine2/build/index.js",
      "testURL": "about:blank",
      "timers": "real",
      "transform": [
        [
          "^.+\\.jsx?$",
          "/Users/danielkezerashvili/code/fender/node_modules/babel-jest/build/index.js"
        ]
      ],
      "transformIgnorePatterns": [
        "/node_modules/"
      ],
      "watchPathIgnorePatterns": []
    },
    {
      "automock": false,
      "browser": false,
      "cache": false,
      "cacheDirectory": "/var/folders/xr/5r2b_hb15fq__s8wmtrqgk340000gn/T/jest_dx",
      "clearMocks": false,
      "coveragePathIgnorePatterns": [
        "/node_modules/"
      ],
      "detectLeaks": false,
      "forceCoverageMatch": [],
      "globals": {},
      "haste": {
        "providesModuleNodeModules": []
      },
      "moduleDirectories": [
        "node_modules"
      ],
      "moduleFileExtensions": [
        "js",
        "json",
        "jsx",
        "node"
      ],
      "moduleNameMapper": {},
      "modulePathIgnorePatterns": [],
      "name": "f45973065cdc7ead5356f40bc3bbe1a0",
      "resetMocks": false,
      "resetModules": false,
      "restoreMocks": false,
      "rootDir": "/Users/danielkezerashvili/code/fender/packages/leaf",
      "roots": [
        "/Users/danielkezerashvili/code/fender/packages/leaf"
      ],
      "runner": "jest-runner",
      "setupFiles": [
        "/Users/danielkezerashvili/code/fender/node_modules/regenerator-runtime/runtime.js"
      ],
      "snapshotSerializers": [],
      "testEnvironment": "jest-environment-jsdom",
      "testEnvironmentOptions": {},
      "testLocationInResults": false,
      "testMatch": [
        "**/__tests__/**/*.js?(x)",
        "**/?(*.)(spec|test).js?(x)"
      ],
      "testPathIgnorePatterns": [
        "/node_modules/"
      ],
      "testRegex": "",
      "testRunner": "/Users/danielkezerashvili/code/fender/node_modules/jest-jasmine2/build/index.js",
      "testURL": "about:blank",
      "timers": "real",
      "transform": [
        [
          "^.+\\.jsx?$",
          "/Users/danielkezerashvili/code/fender/node_modules/babel-jest/build/index.js"
        ]
      ],
      "transformIgnorePatterns": [
        "/node_modules/"
      ],
      "watchPathIgnorePatterns": []
    }
  ],
  "globalConfig": {
    "bail": false,
    "changedFilesWithAncestor": false,
    "coverageDirectory": "/Users/danielkezerashvili/code/fender/coverage",
    "coverageReporters": [
      "json",
      "text",
      "lcov",
      "clover"
    ],
    "detectLeaks": false,
    "expand": false,
    "globalSetup": null,
    "globalTeardown": null,
    "listTests": false,
    "maxWorkers": 7,
    "noStackTrace": false,
    "nonFlagArgs": [],
    "notify": false,
    "notifyMode": "always",
    "passWithNoTests": false,
    "projects": [
      "/Users/danielkezerashvili/code/fender/packages/async-leaf",
      "/Users/danielkezerashvili/code/fender/packages/component-library",
      "/Users/danielkezerashvili/code/fender/packages/conductor",
      "/Users/danielkezerashvili/code/fender/packages/forms-list",
      "/Users/danielkezerashvili/code/fender/packages/leaf"
    ],
    "rootDir": "/Users/danielkezerashvili/code/fender",
    "runTestsByPath": false,
    "testFailureExitCode": 1,
    "testPathPattern": "",
    "testResultsProcessor": null,
    "updateSnapshot": "new",
    "useStderr": false,
    "verbose": null,
    "watch": false,
    "watchman": true
  },
  "version": "22.4.3"
}
Done in 0.24s.

Additional things to note:

  • I have tried to run this with --no-cache it did not solve the issue.
  • I'm happy to make a separate issue if it will be helpful

@SimenB
Copy link
Member

SimenB commented Mar 23, 2018

Separate issue, please 🙂

@sibelius
Copy link

@dan-kez did you fix your issue? do you have a repro?

@dan-kez
Copy link

dan-kez commented Nov 10, 2018

@sibelius I was able to resolve it by deleting the repo locally and re cloning it. I haven't had the issue again so I imagine it may be due to something weird in the cache. If you're having this issue I recommend giving that a try.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests