Universal Cart Engine
This module is client agnostic and is intended to decouple the UI from the underlying business logic for cart and promotion calculations.
To mock scenarios, construct a context object and then pass it into the engine
What you need
- Node.js
- Yarn package manager https://yarnpkg.com/lang/en/docs/install/
Running unit tests
To unit test the application simply run the yarn test command which will recursively find test files using Jest.
$ yarn test
- Files with
.js
suffix in__tests__
folders. - Files with
.test.js
suffix. - Files with
.spec.js
suffix.