diff --git a/typescript/option/src/helpers/isSome.test.ts b/typescript/option/src/helpers/isSome.test.ts new file mode 100644 index 0000000..b1f2361 --- /dev/null +++ b/typescript/option/src/helpers/isSome.test.ts @@ -0,0 +1,22 @@ +import { expect } from 'chai' +import { None } from '../types' +import { someX } from '../../test/constants' +import { isSome } from './isSome' + +describe('The isSome helper', () => { + it('should return true when given Some', () => { + // act + const result = isSome(someX) + + // assert + expect(result).to.equal(true) + }) + + it('should return false when given None', () => { + // act + const result = isSome(None) + + // assert + expect(result).to.equal(false) + }) +})