@typed/fp
Version:
Data Structures and Resources for fp-ts
21 lines (17 loc) • 465 B
text/typescript
import { deepStrictEqual } from 'assert'
import { right } from 'fp-ts/These'
import { describe } from 'mocha'
import * as D from './Decoder'
describe(__filename, () => {
describe(D.fromStruct.name, () => {
const PostEmailBody = D.fromStruct({
to: D.string,
to_name: D.string,
from: D.string,
from_name: D.string,
subject: D.string,
body: D.string,
})
deepStrictEqual(PostEmailBody.decode({}), right({}))
})
})