Open angeryrohan opened 6 years ago
Used Ava.js & Istanbul, a JavaScript test coverage tool.
Imported nyc from Istanbul in particular for coverage purposes
Ignored MacOS junk by adding it in .gitignore
Included const fs = require('fs');
const fs = require('fs');
Saved base (main) path
Searching all folders inside 'cli-commands' to grab all implementations of cmd.js
Mapping them using the commandsArray
Deleted src/services/index.js
Added Code Coverage
Used Ava.js & Istanbul, a JavaScript test coverage tool.
Imported nyc from Istanbul in particular for coverage purposes
Ignored MacOS junk by adding it in .gitignore
This is how the coverage test looks like!
Improved Dynamic Command Registering
Included
const fs = require('fs');
Saved base (main) path
Searching all folders inside 'cli-commands' to grab all implementations of cmd.js
Mapping them using the commandsArray
Deleted src/services/index.js
Before
After
Removed
Successful