raulvillares / 3sacrowd

Tic-Tac-Toe puzzle using plain javascript :video_game:
https://raulvillares.github.io/3sacrowd/index.html
35 stars 69 forks source link

Updating infoTest.js file and adding squareImagesTest.js file #50

Closed JonyHM closed 4 years ago

JonyHM commented 4 years ago

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.