GithubHelp home page GithubHelp logo

benchco's Introduction

BenchLabs - front-end code challenge

This project was generated with Angular CLI version 13.2.2.

Installation

  1. Ensure you have node 16.x installed on your computer
  2. Using your favorite terminal navigate to the project's root folder and run npm install

Development server

Run ng serve for a dev server if you have the Angular CLI installed else run npm run start. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Build

Run ng build to build the project or npm run build. The build artifacts will be stored in the dist/ directory.

Running unit tests

Run ng test, or npm run test to execute the unit tests via Karma.

Considerations

I tried to keep things simple, there are things I would have done differently for production code depending on requirements. Things such as creating a responsive layout with an actual theme, fonts, and updated design. I did start to add paging but decided that was overkill and instead just loaded all results at once. My unit tests do not cover everything, I just added a few for examples.

  1. You'll notice I had to manually convert the values to numbers in my calculateTotal method, this is because for whatever reason (I am not positive) Angular was changing the values to strings leaving you with a long string of numbers, not the sum.
  2. There are places I would break up the component, normally I place results in a display component, and leave the main page as an orchestrator and/or route.
  3. The error page is extremely basic and could be done a better, but I believe it works and is easily refactored to look prettier.
  4. My commits are not that organized, but I find that commit messages don't do much in the long run as they are normally quashed when merging the feature branch back into the main.
  5. I am aware that I am using a deprecated method with expect().toBeObservable() but I am running short on time to look up the new way of testing observables.
  6. I would also have converted the project to use Jest over Jasmine if I had time

benchco's People

Contributors

jmb-qhr avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.