"use strict";

var _vitest = require("vitest");
var _option = _interopRequireDefault(require("../../lib/data/option.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
(0, _vitest.describe)('Option Data Type Tests', function () {
  // Original test: 'option empty'
  (0, _vitest.it)('option empty', function () {
    (0, _vitest.expect)(_option["default"].none().isPresent()).toBe(false);
  });

  // Original test: 'option not empty'
  (0, _vitest.it)('option not empty', function () {
    (0, _vitest.expect)(_option["default"].some(12).isPresent()).toBe(true);
  });

  // Original test: 'option empty mapped'
  (0, _vitest.it)('option empty mapped', function () {
    (0, _vitest.expect)(_option["default"].none().map(function (a) {
      return a;
    }).isPresent()).toBe(false);
  });

  // Original test: 'option not empty mapped'
  (0, _vitest.it)('option not empty mapped', function () {
    (0, _vitest.expect)(_option["default"].some(12).map(function (a) {
      return a;
    }).get()).toBe(12);
  });

  // Original test: 'option not empty flat mapped to option'
  (0, _vitest.it)('option not empty flat mapped to option', function () {
    (0, _vitest.expect)(_option["default"].some(12).flatMap(function (a) {
      return _option["default"].some(a);
    }).get()).toBe(12);
  });

  // Original test: 'option empty flat mapped'
  (0, _vitest.it)('option empty flat mapped', function () {
    (0, _vitest.expect)(_option["default"].none().flatMap(function (a) {
      return a; // This function wouldn't be called for none()
    }).isPresent()).toBe(false);
  });

  // Original test: 'option empty or else'
  (0, _vitest.it)('option empty or else', function () {
    (0, _vitest.expect)(_option["default"].none().orElse(12)).toBe(12);
  });

  // Original test: 'option not empty or else'
  (0, _vitest.it)('option not empty or else', function () {
    (0, _vitest.expect)(_option["default"].some(12).orElse(14)).toBe(12);
  });

  // Original test: 'option empty or lazy else'
  (0, _vitest.it)('option empty or lazy else', function () {
    (0, _vitest.expect)(_option["default"].none().orLazyElse(function () {
      return 12;
    })).toBe(12);
  });

  // Original test: 'option not empty or lazy else'
  (0, _vitest.it)('option not empty or lazy else', function () {
    (0, _vitest.expect)(_option["default"].some(12).orLazyElse(function () {
      return 14;
    })).toBe(12);
  });

  // Original test: 'option empty filter'
  (0, _vitest.it)('option empty filter', function () {
    (0, _vitest.expect)(_option["default"].none().filter(function (v) {
      return v === 1;
    }).isPresent()).toBe(false);
  });

  // Original test: 'option not empty filter'
  (0, _vitest.it)('option not empty filter', function () {
    (0, _vitest.expect)(_option["default"].some(12).filter(function (v) {
      return v === 12;
    }).get()).toBe(12);
  });

  // Original test: 'option not empty wrong filter'
  (0, _vitest.it)('option not empty wrong filter', function () {
    (0, _vitest.expect)(_option["default"].some(12).filter(function (v) {
      return v === 13;
    }).isPresent()).toBe(false);
  });
});
//# sourceMappingURL=option.spec.js.map