-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
$mock
module supports only unions of mocks ($mock.union
).
It could be useful to have intersections of mocks as follows:
const mockA = $mock.struct({ a: $mock.string })
const mockB = $mock.struct({ b: $mock.number })
const mockC = $mock.intersection(mockA, mockB)
Something similar, currently can be achieved this way:
const mockC = pipe(
mockA,
$mock.bindTo('mockA'),
$mock.apS('mockB', mockB),
$mock.map(({ mockA, mockB }) => ({
...mockA,
...mockB,
}))
)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request