Closed mingos777 closed 5 years ago
Hi @mingos777,
I agree that using puppeteer-driven Chrome is sub-optimal. Unfortunately, rot.js uses a non-trivial amount of clientside-specific APIs (canvas, CSS OM), so testing tools that are native to nodejs cannot be really used. In other words, we need a real web browser to run all rot.js tests.
You can do that manually by opening https://github.com/ondras/rot.js/blob/master/tests/index.html in your browser: this uses the client-side Jasmine test runner. I am open to suggestions how to do this in an automated way from the command line
My experience with puppeteer is pretty low, so I cannot explain why your local chromium-based setup fails. But it seems to me that the issue is with the puppeteer-chromium binding, not related to rot.js testing infrastructure.
OK, I was unaware of browser-specific APIs usage. Closing the issue for now as it was more of a question than a request to provide a fix.
Is there a reason to use Puppeteer specifically? It causes all sorts of problems for people not using the same browser or operating system. The
tests/run.js
file specifies the browser path to be/usr/bin/google-chrome
but"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
/snap/bin/chromium
Unfortunately, changing the path does not work and I get this:
Is there a reason for using Puppeteer instead of just plain Mocha or Jasmine?