Skip to content

jkrgS/JS-clock

Repository files navigation

Tech assignment: Clock

This assignment is for gauging your knowledge of Javascript. You should take no more than 2 hours to complete it. In case you are done early: look at ways to refactor your code. In case you're not finished: that's also OK.

We care for quality over quantity. Building the right code is more important than building all code.

The Goal

Implement a clock that handles times without dates.

You should be able to add minutes to and subtract minutes from it.

Two clocks that represent the same time should be equal to each other.

Tests in clock.spec.js file validate the correctness of the solution. We will be looking at the tests in addition to the quality of the code to evaluate your solution. Aim to have as many of them pass as possible. It may be helpful to look at the test suite beforehand and run the tests whilst working on your solution to see if you're on the right path.

Setup

  • Install NodeJS: follow instructions on nodejs.org.
  • Install assignment dependencies:
npm install

Making the test suite pass

  • Execute the tests with:
npm test

In the test suite all tests are failing from the start, the goal is to get them to pass. Execute the tests to validate your solution. For the full test suite and to see what's needed to get the tests passing see the clock.spec.js file. To skip a test change test to xtest.

Use git for this assignment the way how you would use for any other project you care about.

Submitting the assignment

Once you run out of time, have the assignment ready or just feel like it, you can submit it using:

git push --all

Submitting Incomplete Assignments

It's possible to submit an incomplete assignment. Push your code as often as you want!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published