Rakudo.js update - running tests in a real Chrome

What now works

We now can parcel up and pass tests from our chosen subset under a real Chrome (for testing purposes a Headless Chrome controlled by puppeteer).

Our test runner is in https://github.com/pmurias/perl6-js-roast-test-runner

It runs tests using a precompiled working version of rakudo.js fetch from npm using a roast revision we know passes.

What's missing or fudged?

Tests that are broken under precompilation on all backends

In the browser we precompile tests before running which means the tests are run differently then
how they are tested on other backends.
As a result a whole bunch of tests fail under precompilation even on the Moar backend.
They need to be fixed as they are real bugs in Rakudo on all backends (as most proper codes
tends to live in precompiled modules not scripts) but that's work separate from the js backend.

Tests that don't make sense in the browser itself.

The browser itself doesn't currently support directly writing to the users file system.
For that reason test cases that creates temporary files or directories are fudged.
Running external shell commands is not supported either.
However running code snippets in a fresh rakudo with is_run from Test::Util is emulated.
Tests for MAIN don't pass in the browser either as they don't really make sense.

That one test that doesn't pass because that Chrome comes with has a bug.

Puppeteer uses a weird canary chrome version that has some issues with Array.shift

What's next?

From now one that we have enough raw test passing ability the focus will be on making rakudo.js more usable for users.
Making 6pad a much cooler toy is also planned in the mid term plans.
Things as better examples and improved js interop (so that things such as WebGL/canvas/React.js can be used more easily) will make playing with 6pad (and the rakudo.js in general) a lot more fun.
A lot of the remaining tests depend on IO (and a such will only pass in the browser) or on different threading model than JS already has.
The IO ones will be addressed when needed but it's not a priority unless someone needs that when running on node.js.

Leave a comment

About Paweł Murias

user-pic This is my JavaScript backend for Rakudo/NQP blog.