/counter-test

Counter javascript test boilerplate

Primary LanguageJavaScriptMIT LicenseMIT

Counter JavaScript test

Problem

Develop an app using JavaScript and ReactJS that allows you to track multiple counter totals in the browser.

The app should consist of the following. A total counter, the ability to add a counter and the ability to increment and decrement that counter. (See layout for example UI).

Example UI
Example

Provided

You can use the boilerplate provided in the repo, or create your own structure if you prefer.

Includes

Commands

Assumes you have node 0.12 installed. We are aware of issues installing on node 4+.

$ npm run setup     # install global dependencies, node modules and build production assets
$ npm run build     # build assets
$ npm test          # run tests
$ npm start         # start server on localhost:5000

Testing

For convenience the most common React TestUtils methods are exposed globally in the tests. These include:

TestUtils
renderIntoDocument
Simulate
scryByType
findByType
scryByClass
findByClass
scryByTag
findByTag
scryByProp
findByProp

Requirements

  • App should work on latest Chrome and Firefox