@chris.troutner/npm-lib-boilerplate

1.0.13 • Public • Published

npm-lib-boilerplate

This repository is a code 'boilerplate' for starting a new npm library. It contains the following features:

  • Semantic Release configured to work with Travis CI.
  • Automatic linting using Standard JavaScript.
  • Unit and integration tests using Mocha and Chai, following the best practices and design patterns in this YouTube video:
    • Uses ECMAScript 2015 Class for business logic and utility libraries.
    • Follows TDD best practices.
    • Uses _this to maintain context to the instance of the class.
    • Uses Sinon stubs to mock external dependencies for unit tests.
    • Each function is wrapped in try/catch statements, allowing thrown errors to 'bubble up' to the top-level function, and give every function along the way an opportunity to handle exceptions.
    • Testing assertions focus on properties and structure, not values.

Licence

MIT

Package Sidebar

Install

npm i @chris.troutner/npm-lib-boilerplate

Weekly Downloads

1

Version

1.0.13

License

MIT

Unpacked Size

14.9 kB

Total Files

17

Last publish

Collaborators

  • chris.troutner