ng-clip
ng-clip copied to clipboard
Testing the module
Hi Asaf, I am now writing tests for this module using mocha, the problem is that for the module to be testable the ZeroClipboard instances will have to be stored inside a service \ factory, in order to call the getText() method from the test(probably service...)
Now I am thinking about about a good way to implement this, and the only way I've been able to come up with so far is a hash map that will contain the zeroClipboard object as value, and the key will be the element id(not good, don't want to force the users to set an id attribute for the element they bind the plugin to)
Any ideas?
Look at those ones: https://github.com/BeOleg/ng-clip/commit/c0e00da22bfa3e4da5d1f10bbbeacf7b741b99ea https://github.com/BeOleg/ng-clip/commit/6ebc0e37ecfa89092656e4c5dbd7b758a2a124b0
https://github.com/zeroclipboard/zeroclipboard/issues/334