Skip to content

Instantly share code, notes, and snippets.

View impurist's full-sized avatar
🎸
Lets play

Steven Holloway impurist

🎸
Lets play
  • Melbourne, Australia
View GitHub Profile
@impurist
impurist / index.spec.ts
Created July 8, 2021 04:22
either-option
import * as E from 'fp-ts/lib/Either';
import * as O from 'fp-ts/lib/Option';
import { flow, pipe } from 'fp-ts/function';
describe('Either', () => {
describe('.fromNullable', () => {
const errorMessage = 'input was null or undefined';
const toEither = E.fromNullable(errorMessage);
it('should return right with string', async () => {