Skip to content

wojciechowskim/a2i-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A2I tests

Requirements

  1. node
  2. npm

Set up

  1. Run npm install to install dependencies.

More info on the tools I used can be found at the end of the readme.

Before running the suites, make sure you download the import data .csv files and put them into the data directory under the name of, for example, Import - 2006.csv.

Execution

Run npm test to run all suites.

The test script can be found in the package.json file under the key test.

Adding new tests

  1. Create a new report config file in base/config/economy or base/config/product, depending on the type of the report.

Add a URL of the API call for each chart.

Add a list of commodities (can be copied from the URL).

  1. Create a test file in either test/economy/ or test/product, depending on the type of the report.

The test file should be named [report_name].test.js as is stated in the package.json.

  1. Write beautiful testing code.

  2. ???

  3. PROFIT

Libraries used

  1. mocha.js - test framework using Node.js
  2. chai.js - assertion library
  3. PapaParse - library used to parse .csv files
  4. axios - library used for making http requests

To do

  1. Fix comparing value and value_per_weight.
  2. Add bar chart tests.
  3. Add multi line chart tests.
  4. Add map chart tests.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published