busterjs / buster

Abandoned - A powerful suite of automated test tools for JavaScript.
http://docs.busterjs.org
Other
448 stars 37 forks source link

`assert.match` does not support objects with `null` properties #359

Closed davidaurelio closed 9 years ago

davidaurelio commented 11 years ago
assert.match({a: null, b: 1}, {a: null});

should pass, but fails with

[assert.match] Matcher (null) was not a string, a number, a function, a boolean or an object
augustl commented 11 years ago

The matcher is very polymorphic and handles different cases in very specific ways.

Perhaps the fallback should be to use === instead of throwing an exception? Alternatively, we should add support for null and undefined.

/cc @cjohansen

davidaurelio commented 9 years ago

Any news here? I’ve been bitten again…

davidaurelio commented 9 years ago

There you go: busterjs/samsam#10

dwittner commented 9 years ago

@davidaurelio, for me your request makes absolutely sense, but before i merge it, i would like to know, what @cjohansen thinks about it.

dominykas commented 9 years ago

Also related: https://github.com/busterjs/buster/issues/64 and https://github.com/busterjs/samsam/pull/9

dwittner commented 9 years ago

@dymonaz, yes, i have seen. I would like to merge both pull requests, but before i want to talk with @cjohansen about them. Unfortunately he is not available since a few days.

cjohansen commented 9 years ago

I just merged busterjs/samsam#10, and will merge busterjs/samsam#9 as soon as @dymonaz rebases.

dominykas commented 9 years ago

I believe this can be closed too? :)