How to use the recursive-readdir.mockResolvedValue function in recursive-readdir

To help you get started, we’ve selected a few recursive-readdir 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 Yoctol / bottender / packages / bottender / src / cli / providers / messenger / __tests__ / uploadAttachment.spec.js View on Github external
beforeEach(() => {
    _client = {
      getPageInfo: jest.fn(),
      uploadAttachment: jest.fn(),
    };
    MessengerClient.connect = jest.fn(() => _client);
    getConfig.mockReturnValue(MOCK_FILE_WITH_PLATFORM.messenger);
    readdir.mockResolvedValue([
      {
        name: 'The X-Files',
      },
    ]);
    inquirer.prompt = jest.fn();
    inquirer.prompt.mockResolvedValue({
      confirm: true,
    });
    process.exit = jest.fn();
  });

recursive-readdir

Get an array of all files in a directory and subdirectories.

MIT
Latest version published 2 years ago

Package Health Score

74 / 100
Full package analysis