How to use the cosmiconfig.cosmiconfigSync.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 kentcdodds / kcd-scripts / src / __tests__ / utils.js View on Github external
function mockCosmiconfig(result = null) {
  const {cosmiconfigSync} = require('cosmiconfig')

  cosmiconfigSync.mockImplementationOnce(() => ({search: () => 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