danthareja / node-google-apps-script

[DEPRECATED - use clasp instead] The easiest way to develop Google Apps Script projects
MIT License
353 stars 70 forks source link

Add initial tests #81

Closed lricoy closed 6 years ago

lricoy commented 6 years ago

I think we sould add a few unit tests and hopefully some functional as well.

Since we've bumped the node version requirement to 8+ we have more test library options now. I would rather add the tests before start refactoring the code.

Any tips on where to start @danthareja @aurelienshz ?

danthareja commented 6 years ago

I definitely agree with your decision to write tests before starting to refactor. Once we get some test coverage, i'll publish a major version bump.

I think a good place to start is to test the functionality of each exported command inside of lib/commands. If we stick to testing the public interface, we will have more flexibility to refactor the internals, and also have some confidence that we're not breaking the behavior users are expecting.

In terms of test libraries, as you said there are a lot of good options and I'm not tied to a particular one and encourage you to use whatever you think you will be most productive with!