text: /**
   * @generated-from ./$first-or.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 { asyncFirstOr, range } from '../../..';
  describe('asyncFirstOr', () => {
    describe('when iterable contains items', () => {
      it('returns first item', async () => {
        const iter = range(10);
        expect(await asyncFirstOr(null, iter)).toBe(0);
      });
    });
    describe('when iterable is empty', () => {
      it('returns whenEmpty', async () => {
        const iter = range(0);
        expect(await asyncFirstOr(null, iter)).toBe(null);
      });
    });
  });
  