sighjs / sigh

multi-process expressive build system for the web and node.js, built using baconjs observables
209 stars 12 forks source link

Testing console.log #24

Closed jmatsushita closed 8 years ago

jmatsushita commented 8 years ago

I'm trying to write a very simple plugin that outputs the type and path of event it receives. https://github.com/iilab/sigh-debug

When trying to write a test for it I've looked at this approach http://stackoverflow.com/a/24521132

This is the relevant code

The test fails with

 * mocha: run tests in process 28461
 ! error: pipeline mocha
 ! Error: Unspecified AssertionError

I realise this is probably due more to my lack of experience in matching Promises, tests and the type of stubbing that Sinon does, but hopefully you can shed some lights!

insidewhy commented 8 years ago

The problem here is you aren't providing any input files. The error is misleading, I'll create another issue for it.

insidewhy commented 8 years ago

Oops sorry that message was meant for another commit. This error is related to mocha rather than sigh I think?

insidewhy commented 8 years ago

Sorry I have no idea what's going wrong here, but I think your plugin should definitely work! Just gotta debug your mocha stuff more.