deepak-vasalamarri / boilerplate-karma-mocha-chai-requirejs

Ready to TDD boilerplate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecation note

Since ES6/7 with babel+webpack/browserefy becomes usefull this days RequireJS looks a bit outdated.

ReactJS community have a lot of sample code written in ES6/7 in isomorphic style.

Boilerplate for Karma-runner + mocha + chai + requirejs

This is boilerplate with ready to TDD:

See details: http://karma-runner.github.io/0.8/plus/RequireJS.html

Directories layout

$ tree
.
├── js
│   ├── lib         => place for source files
│   ├── spec        => place for *_spec.js files
│   │   └── sample_spec.js
│   └── vendor      => place for vendor libs
├── karma.conf.js   => karma-runner configuration
├── karma_html      => html-reporter output (appears after first run)
├── karma_sound     => samples for customization karma-mp3-reporter (see karma.conf.js)
├── package.json
├── test            => according to mocha.opts specific this directory contains:
│   ├── mocha.opts    >> default ARGV opts for mocha console command (not used for front-end js)
│   └── test-main.js  >> requirejs entry point for tests
├── README.md
└── UserStories.md  => mind-set for building this project

Setup

$ npm install

Start karma

$ karma start

Additional features

Besides usual components this boilerplate contains:

About

Ready to TDD boilerplate


Languages

Language:JavaScript 100.0%