Create a cart class and corresponding tests.
The cart should save, read and delete simple objects. As storing enging the cart should have at least two of the following options:
- Cookie
- Session
- Local storage
- Service worker
- Web SQL
The cart implementation should be designed either as class with inheritance (baseclass, subclasses) or module following functional programming or classic OOP.
The tests should cover all methods.
Writing Next Generation Reusable JavaScript Modules in ECMAScript 6
ES6 Web Components Part 1 โ A Man Without a Framework
Both command can be run parallel and do watch your files for changes.
Start
npm start
Test
npm test
Metrics
npm metrics
Install webpack:
npm install webpack webpack-dev-server -g
Install KARMA and framework adapters:
npm install -g karma karma-browserify karma-mocha karma-chai karma-chrome-launcher karma-coverage karma-firefox-launcher karma-phantomjs-launcher karma-sauce-launcher karma-sinon
Install mocha, chai, sinon:
npm install -g mocha chai sinon
Install PhantomJS via homebrew (or direct download):
brew update && brew install phantomjs
Install Plato:
In case plato is already installed. Remove Plato and install the ES6 fork.
npm uninstall plato
Install the ES6 fork by deedubs:
npm install -g git+https://github.com/deedubs/es6-plato.git
Copyright 2016 Kopfwelt GmbH.