shaack / cm-pgn

Parse and create PGNs (Portable Game Notation for chess games)
MIT License
28 stars 20 forks source link

How to run unit tests? #18

Closed jackstenglein closed 1 year ago

jackstenglein commented 1 year ago

I've converted this package to Typescript in my fork, but I'm not sure how to run the unit tests to check it. The npm test script seems to suggest that I should just open test/index.html, but when I do that, I see errors like:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///Users/jackstenglein/Documents/projects/cm-pgn/test/PgnList.test.js. (Reason: CORS request not http).

Also, if I can verify that the tests still pass, would you be interested in a PR for the Typescript conversion?

jackstenglein commented 1 year ago

Closing this as I decided to just migrate the existing tests over to jest and use that to run them.