How to use the cosmiconfig.mockImplementationOnce function in cosmiconfig

To help you get started, we’ve selected a few cosmiconfig examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github okonet / lint-staged / test / index.spec.js View on Github external
const mockCosmiconfigWith = result => {
  cosmiconfig.mockImplementationOnce(() => ({
    search: () => Promise.resolve(result)
  }))
}

cosmiconfig

Find and load configuration from a package.json property, rc file, TypeScript module, and more!

MIT
Latest version published 5 months ago

Package Health Score

84 / 100
Full package analysis