question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Jest Projects: Could not find 'jest-dynalite-config.js' file

See original GitHub issue

Hi!

Thanks for that awesome package! Unfortunately my setup doesn’t seem to work with v2 anymore. I get the following error:

Test suite failed to run

    Could not find 'jest-dynalite-config.js' file

      at loadConfig (../../../node_modules/jest-dynalite/dist/config.js:12:11)
      at Object.<anonymous> (../../../node_modules/jest-dynalite/dist/config.js:15:14)
      at Object.<anonymous> (../../../node_modules/jest-dynalite/dist/setup.js:3:18)

–> Where does jest-dynalite look for the config file?

|-jest.config.js
|-functions
|   |-jest.config.js
|   |-jest-dynalite-config.js
|   |-jest.setupAfterEnv.js
|   |-jest.setupBeforeEnv.js

// jest.config.js
module.exports = {
  projects: [
    "<rootDir>/functions/jest.config.js",
  ],
};

// functions/jest.config.js
module.exports = {
  name: "functions",
  displayName: "functions",
  testMatch: ["**/*.test.ts", "**/test.ts"],
  preset: "jest-dynalite",
  setupFiles: ["./jest.setupBeforeEnv.js"],
  setupFilesAfterEnv: ["./jest.setupAfterEnv.js"],
  testTimeout: 10000,
  transform: {
    "^.+\\.tsx?$": "ts-jest",
  },
};

// functions/jest.setupBeforeEnv.js
const { setup } = require("jest-dynalite");

setup(__dirname);

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
fresholliecommented, Jul 3, 2020

PR in for this https://github.com/freshollie/jest-dynalite/pull/7 I will release as v2.0.2 @Purii

0reactions
Puriicommented, Jul 20, 2020

Works perfectly. Thanks @freshollie!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring Jest
The configuration file should simply export an object: JavaScript ... Node.js core modules, like fs , are not mocked by default. They can...
Read more >
Jest Projects in a Monorepo unable to find config files in projects
Okay, so after 4 days of intense digging through reported issues on github and a handful of youtube tutorials I could find, I...
Read more >
Run/Debug Configuration: Jest | IntelliJ IDEA Documentation
If no appropriate package.json file is found, then a Jest default ... If you choose the Project alias, IntelliJ IDEA will automatically use ......
Read more >
Configuring Jest compiled - w3resource
jest.config.js ``module.exports = { verbose: true, }; ... When the file specified by path is not found, error will be returned.
Read more >
Monorepo testing using jest projects - Orlando Bayo Adeyemi
We use jest for testing, and although jest added a [multi-project runner] over a year ago, I couldn't find any guides on it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found