How to use the globby.mockImplementation function in globby

To help you get started, we’ve selected a few globby 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 algolia / shipjs / packages / shipjs / src / step / release / __tests__ / createGitHubRelease.spec.js View on Github external
beforeEach(() => {
    getRepoInfo.mockImplementation(() => ({
      owner: 'my',
      name: 'repo',
    }));
    fs.readFileSync = jest.fn();
    fs.statSync = jest.fn().mockImplementation(() => ({ size: 1024 }));
    mime.lookup.mockImplementation(() => 'application/zip');
    globby.mockImplementation(path => Promise.resolve([path]));
  });

globby

User-friendly glob matching

MIT
Latest version published 5 months ago

Package Health Score

81 / 100
Full package analysis