Ellisande / mockolate

Simple mocking framework for JS
MIT License
1 stars 3 forks source link

Matchers #2

Closed Ellisande closed 8 years ago

Ellisande commented 8 years ago

What kind of issue is this? (bug, feature, etc)

Feature

What is the proposed change?

Add in matchers that will allow for easier stubbing

Why will this be beneficial?

It will facilitate better matching for whens, which in turn will make stubbing better.

Misc. info

Matchers will have to have some defining way to tell they are matchers. Maybe an isMatcher function, or have all matchers extend a common matcher class. We have to be able to tell which args are legitimate values and which ones are matchers.

Some thoughts for starting matchers:

Ellisande commented 8 years ago

Initial implementation will just be setting up the interface for the Matcher class and two reference implementations: