Test js libraries in core

Also minor change to ascii text data handling in assert() of that test (\r\n vs \n difference)
Moving it like this to core doesn't change anything - it just makes the test run multiple times, once per mode, but they are all going to be identical with `emcc -O0`.

To get all the modes tested, you need to use `do_run`, not run emcc yourself.