- node
- npm
- 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
.
Run npm test
to run all suites.
The test script can be found in the package.json
file under the key test
.
- Create a new report config file in
base/config/economy
orbase/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).
- Create a test file in either
test/economy/
ortest/product
, depending on the type of the report.
The test file should be named
[report_name].test.js
as is stated in thepackage.json
.
-
Write beautiful testing code.
-
???
-
PROFIT
- mocha.js - test framework using Node.js
- chai.js - assertion library
- PapaParse - library used to parse
.csv
files - axios - library used for making http requests
- Fix comparing value and value_per_weight.
- Add bar chart tests.
- Add multi line chart tests.
- Add map chart tests.