mjackson / expect

Write better assertions
MIT License
2.29k stars 117 forks source link

add satisfy method to expectation class #213

Closed ghost closed 7 years ago

ghost commented 7 years ago

I added a method for 'generic tests' called satisfy(alias: meet), hope it helps if the existing methods don't 'meet' what the test needs.

ghost commented 7 years ago

I had a problem running the command "npm run lint". I guess that I'm running it on Windows 10.

ghost commented 7 years ago

I stuck trying to discover why Travis build failed at Firefox 43 and Chrome 47 on Windows 10, Safari 9 in Mac OSX. Maybe a assert npm module problem or the use of arrow functions on tests?

ljharb commented 7 years ago

Is this a pattern from other test frameworks? I'm curious why you wouldn't just use expect(callback(obj)).toEqual(true, msg)

ghost commented 7 years ago

@ljharb, thanks for the heads up, I didn't knew that would work, sorry.