- Make sure Node.js(8.0+) are installed as this is a command line application are implemented by javascript
git clone https://github.com/johnny-dash/Myob
cd Myob
npm i
- put your input csv file in the input folder or change the input/output file path in the config.json
By running the following code, you will see the result of pay slip printed in the console and these data will be written into the csv file that defined in the output path in config.json.
npm run start
run the following command line to run the unit test
npm run test
run the following command line to check the unit test coverage
npm run test:cover
- Save the tax rates table to a json file and could easily maintain and change in the future.
- Using Joi to do the validation.The validator could be reuse and change in the future.
- Use
Jest
for testing
- Both input and output file should be csv file
- There is no header for input/output file
- columns in the csv file should be separated by comma
- The input of payment start date should have correct format
Please put the value of column in the following order:
firstName, lastName, annualSalary, superRate, paymentStartDate
name, payPeriod, grossIncome, incomeTax, netIncome, superannuation