Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.77 KB

Readme.md

File metadata and controls

37 lines (25 loc) · 1.77 KB

NodeJS Kata Scaffolding

Use this to start a project very quickly such as a kata where you do not need anything fancy but just babel and ability to run tests and run JS and Node

Note: I do plan on keeping this fairly up-to-date with the the current version of Babel, mocha, and Jest. Currently Babel is version 7.

Contents

Configured for:

  • Babel 7
  • Mocha
  • Jest (coming soon)
  • eslint - eslint-config-airbnb-base (for projects without React) & my own custom tweaks
    • For initial package.json setup, you can run npx install-peerdeps --dev eslint-config-airbnb-base to install all of peer dependencies needed for eslint-config-airbnb-base
      • OR install each peer dependency manually by running npm info "eslint-config-airbnb-base@latest" peerDependencies to list the peer dependencies and versions, then run yarn add --dev @ for each listed peer dependency

Tests

To run from command-line:

  • yarn - install dependencies

  • yarn test-mocha

    example of running tests with mocha

  • yarn test-jest - comming soon

IntelliJ GUI Test runner Config

mocha

For IntelliJ or WebStorm, if running the test GUI runner, set "Mocha Options" to the following: -r @babel/register -r chai/register-expect src/test/**/*.spec.js -w

example of running tests with mocha

example of running tests with mocha

jest

coming soon