Adding some tests and their descriptions to infoTest.js and squareImagesTest.js file to the project.
The descriptions of the tests can pollute the code a little, but it increases visibility when the test is executed, making it easier to identify which test has failed.
Obs.: when I tried to execute the existing test cases using item 5 described on this project's README¹, a SyntaxError² was thrown.
¹ 5. run a test example: node -r ./test/entryFileTest.js
² SyntaxError: Unexpected token import
This is not exactly an error. What happened is that I misread the README instruction and thought that node -r could execute each test file individually instead of all the test cases.
To run each test case individually, I used the command npx babel-node <testName.js>, that was found here.
Adding some tests and their descriptions to infoTest.js and squareImagesTest.js file to the project.
The descriptions of the tests can pollute the code a little, but it increases visibility when the test is executed, making it easier to identify which test has failed.
Obs.: when I tried to execute the existing test cases using item 5 described on this project's README¹, a SyntaxError² was thrown.
This is not exactly an error. What happened is that I misread the README instruction and thought that
node -r
could execute each test file individually instead of all the test cases.To run each test case individually, I used the command
npx babel-node <testName.js>
, that was found here.