This is an exercise to build a functioning calculator with a web based user interface.
In order to preview output, open app/index.html
A working version of the app can be viewed here: https://robreczarek.github.io/test-chaining-calculator/app/
In order to test the code via the web browser, open test/SpecRunner.html
To test via the command line, run the following:
npm test
To check the code (lint) for consistency with coding standards, run this command:
npm run lint
- Get Calculator object to work without 'new' operator aka "super linijka"
- Fix UI calculation workflow
- Resolve issue with test suite
- Added ESLint step to npm run lint
- Implement Karma runner into project
- Add Jasmine test suite
- Reformat files to conform to spacing standard
- Move script link references within index.html inside the body tag
- Rename index.js to setup.js
- Break out styles and scripts into their own sub-folders in the app directory
- Add strict mode to all javascript files
- Move UI files into app folder
- When run code
Calculator(3).add(5).mutiply(2).value()
in Google Chrome DevTools opened on this site, tat code should returns16
- Don't use
eval
- invent another idea. - Split modules to couple files (logic, ui, setup)
- Move style to single file
- Move
<script>
tag to the bottom of index.html file