Fix cli.js for testability. #853

Merged
merged 2 commits into from Dec 11, 2012

Projects

None yet

1 participant

@mojit0
Contributor
mojit0 commented Dec 11, 2012

Reorganized cli.js to make it testable.
Now uses an enclosing function to isolate the use strict pragma.
Now uses a top-level object which is exported and which holds all testable functions/properties.
The internal functions now use _ prefixes and can successfully be mocked.
Added tests for all internal functions.

@mojit0 mojit0 merged commit 55af791 into yahoo:develop Dec 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment