tapjs / tmatch

This module exists to facilitate the t.match() method in node-tap (http://npm.im/tap)
22 stars 9 forks source link

Add {unordered} option for matching arrays #7

Closed chrisui closed 8 years ago

chrisui commented 8 years ago

I've had this requirement for two use cases:

  1. Large lists where I want to describe some important elements which should exist but not have to describe every element in order to fill the keys.
  2. Data sets where order is non-deterministic. Particularly when dealing with lots of async data.

All of this compounded with the desire to keep my assertions very succinct within a single pattern value rather than having half pattern matching and half targeted assertions in my test code.

Understandably this may not be something which is wanted in this library but if not would you mind if I made the npm package with name tmatch-unordered and keep it as a fork? :)