Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Flipping argument order #7

@DerekMaffett

Description

@DerekMaffett

Thanks for making these tools - we've been finding them particularly useful on our project.

Have you considered the idea of flipping and currying the arguments to encourage more reusable and composable functions? If the interface was something like this:

ShallowTestUtils.findWithType(type, component);

This would be more in the pattern of functional libraries like Ramda (http://ramdajs.com/0.17/index.html). It would also allow more fine-grained functions if they were curried:

const getButton = ShallowTestUtils.findWithType('button');

It would also permit compositions of these functions to query specific paths of a tree.

pipe(getSpecialDiv, getList, getListItem, getButton)(component)

I'd be happy to work on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions