text: /**
   * @generated-from ./$find.test.js
   * This file is autogenerated from a template. Please do not edit it directly.
   * To rebuild it from its template use the command
   * > npm run generate
   * More information can be found in CONTRIBUTING.md
   */
  
  /* eslint-disable no-unused-vars,import/no-duplicates */
  
  import { asyncFind } from '../../..';
  describe('asyncFind', () => {
    it('returns found item', async () => {
      expect(await asyncFind(item => item === 5, [1, 2, 3, 4, 5, 6])).toBe(5);
    });
    it('returns undefined if no item found', async () => {
      expect(await asyncFind(_ => false, [1, 2, 3, 4, 5, 6])).toBe(undefined);
    });
    it('returns undefined when iterable is empty', async () => {
      expect(await asyncFind(item => item, null)).toBe(undefined);
    });
    it('returns found item (using a promise)', async () => {
      expect(await asyncFind(async item => item === 5, [1, 2, 3, 4, 5, 6])).toBe(5);
    });
  });
  