spmason / expectations

Jasmine-style expect syntax for nodejs + browser
BSD Zero Clause License
30 stars 9 forks source link

spys and mocks #5

Open wyuenho opened 11 years ago

wyuenho commented 11 years ago

Jasmine has a very simple spy and mock facility, it would be nice if this library could incorporate that.

spmason commented 11 years ago

I'm not convinced about adding spys/mocks, I tend to prefer to use sinon directly and it keeps the size/complexity down without it.

That doesn't mean I wouldn't accept a pull request for it though, but I'd prefer it to be a separate file/module from the main library to keep the size down. It could still just be a wrapper around sinon (like what jasmine does)

wyuenho commented 11 years ago

Jasmine doesn't wrap Sinon. Jasmine has a minimalist spy/mock system. I was thinking more like exposing Jasmine's minimalist spy/mock API by wrapping Sinon and Sinon's API. So lazy people like me who are too lazy to look up Sinon's 300 odd methods can keep our heads from exploding, but then the high-level API isn't enough, I can drop down to Sinon.

spmason commented 11 years ago

A wrapper around sinon sounds good, would be great to see a pull request for it :)

On 26 March 2013 04:29, Jimmy Yuen Ho Wong notifications@github.com wrote:

Jasmine doesn't wrap Sinon. Jasmine has a minimalist spy/mock system. I was thinking more of exposing Jasmine's minimalist spy/mock API by wrapping Sinon and Sinon's API. So lazy people like me who are too lazy to look up Sinon's 300 odd methods can keep our heads from exploding.

— Reply to this email directly or view it on GitHubhttps://github.com/spmason/expectations/issues/5#issuecomment-15440508 .