Skip to content

OVNICap/JavaScriptTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript test

In this exercise, you would get history of events from an e-commerce website using an API returning JSON that looks like the following mocked file: test/history-api-mock.json

We expect you to make unit tests from test/index.spec.js pass.

Install

Ue any online IDE you want (like GitPod).

Or on your locale machine:

Install Node.js

Install Git

Clone the project:

git clone https://github.com/OVNICap/JavaScriptTest
cd JavaScriptTest

Install dependencies: npm install

Develop

Modify/create files inside the src directory (you should not need to edit any other file to succeed).

Then fill the methods in src/analytics.js and add intermediate methods if it can help the readability of the code.

Test

You can test your code using npm test

You can debug your code using src/index.js and running npm start

Submit your solution

Then create a pull-request on OVNICap/JavaScriptTest

Travis-CI will run tests, so you can check if everything works fine.

Evaluation

You should first try to get outputs of methods as close as possible to the values unit test expect.

We will take into consideration:

  • the clarity of your code: variables names, indentation, comments;
  • the optimization of the code: significant optimizations like caching results or reducing number of loops would be appreciated.

About

JavaScript test

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published