Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonathanconway/exercise-discount-ascii-warehouse-react-jest
A small demo app to show how to use ReactJS with Jasmine tests and Jest mocking.
https://github.com/jonathanconway/exercise-discount-ascii-warehouse-react-jest
Last synced: 15 days ago
JSON representation
A small demo app to show how to use ReactJS with Jasmine tests and Jest mocking.
- Host: GitHub
- URL: https://github.com/jonathanconway/exercise-discount-ascii-warehouse-react-jest
- Owner: jonathanconway
- License: apache-2.0
- Created: 2015-06-12T11:26:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-27T08:47:34.000Z (over 9 years ago)
- Last Synced: 2023-08-01T07:10:53.546Z (over 1 year ago)
- Language: JavaScript
- Size: 199 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Discount ASCII Warehouse with ReactJS and Jest
This is a demo app, intended as a guide to writing simple apps using ReactJS, unit tested with Jasmine, and with Jest as the mocking tool.
## Requirements
This solution requires the following global dependencies to be installed:
* NodeJS v0.10.0 ([download](https://nodejs.org/dist/v0.10.0/))
(Unfortunately, it only works with this older version, due to Jest. This is an [open issue on GitHub](https://github.com/facebook/jest/issues/243).)
* Gulp (`npm install -g gulp`)
* Jest (`npm install -g jest-cli`)If you have a later version of Node installed, you can still install v0.10 and run them both side-by-side. Simply install the [`n`](https://www.npmjs.com/package/n) package, and use it to install v0.10.0 and switch to v0.10.0. You can always install your newer version as well, and then switch between whichever versions you have installed.
## Installation
After installing the global dependencies, run the following:
`$ npm install`
And then run the solution (launches Grunt, which then spawns NodeJS to serve the files):
`$ npm start`
To run the Jasmine/Jest tests:
`$ npm test`
## License
Apache 2 Copyright © 2015 Jonathan Conway