Presently, Runner almost supports running scenarios in a browser. The only remain issue (?) is that we can't simply import CoffeeScript.
You see, kids, back in the day, we would import code into the browser via script tags. CoffeeScript has been around long enough that it still relies on this notion.
We could easily require that, for browser testing, you need to use the script tag, and then do a dynamic import within Runner when CoffeeScript is undefined. But that's just goofy enough to put if off.
Another option would be to switch to another expression syntax. For example, we could use JavaScript, which obviously is built into the browser. But part of the appeal of runner is being able to embed assertions into YAML files, and JavaScript is just verbose enough to make that awkward, especially since CoffeeScript works fine outside the browser already.
A third option would be to write a simple CoffeeScript parser for handling assertion expressions, which can't get too funky anyway because, again, they're intended to be one-liners embedded in YAML files. The other advantage of this is that it would discourage overly complex assertions, although them being in YAML files already does that.
Presently, Runner almost supports running scenarios in a browser. The only remain issue (?) is that we can't simply import CoffeeScript.
You see, kids, back in the day, we would import code into the browser via
scripttags. CoffeeScript has been around long enough that it still relies on this notion.We could easily require that, for browser testing, you need to use the script tag, and then do a dynamic import within Runner when CoffeeScript is undefined. But that's just goofy enough to put if off.
Another option would be to switch to another expression syntax. For example, we could use JavaScript, which obviously is built into the browser. But part of the appeal of runner is being able to embed assertions into YAML files, and JavaScript is just verbose enough to make that awkward, especially since CoffeeScript works fine outside the browser already.
A third option would be to write a simple CoffeeScript parser for handling assertion expressions, which can't get too funky anyway because, again, they're intended to be one-liners embedded in YAML files. The other advantage of this is that it would discourage overly complex assertions, although them being in YAML files already does that.