cujojs / poly

Small, fast, awesome. The only ES5-ish set of polyfills (shims) you can mix-and-match because they're individual modules.
Other
139 stars 18 forks source link

Unit tests should run against the standalone functions? #2

Closed briancavalier closed 12 years ago

briancavalier commented 12 years ago

I'm thinking that the unit tests should be run against the non-prototype-augmented functions. For example, poly's array.map should be tested by calling array.map(testArray, mapFunc) rather than testArray.map(mapFunc). That way, poly's shims can be fully tested in any environment, rather than only in envs that need shimming.

Then there could be separate unit tests to actually test whether poly's shimming mechanism itself works correctly. What do you think?