gregglind / micropilot

Lightweight event monitoring and observation in Firefox addons.
http://gregglind.github.com/micropilot/
4 stars 2 forks source link

mocking using micropilot #7

Open gregglind opened 11 years ago

gregglind commented 11 years ago

Could happen at lots of layers....

  1. ez_upload gets 'do: false'
  2. willrecord = false

@bwinton ideas on this welcome, if you have use cases / nervousness.

bwinton commented 11 years ago

I'm afraid I don't have a lot of ideas yet, but if I ever get around to testing my stuff, I'll be sure to let you know. ;)

I will say that it would be nice to have it as a fairly global setting, so that I don't have to change the code I'm testing when I test it, if that makes sense…

gregglind commented 11 years ago

@bwinton

For an example how to mock the server end, see: https://github.com/gregglind/micropilot/blob/v0.6/test/test-micropilot-upload.js .

upload was the only unsafe part of micropilot operations, and I think this solves it. How visible does this need to be? Should there be a 'micropilot.fakeServer' or something?