Skip to content

Instantly share code, notes, and snippets.

View alemaocastro1986's full-sized avatar

Andrius Cunha Castro alemaocastro1986

View GitHub Profile
import { Maybe } from './maybe'
describe('Maybe', () => {
it('should handle a value', () => {
const maybe = Maybe.some('test')
expect(maybe.getOrElse('')).toBe('test')
})
it('should handle an undefined value', () => {
const maybe = Maybe.fromValue<string>(undefined)