Skip to main content

One More Yak to Shave

Headshot of Eric

The site is getting published. The CSS needs work. Now it’s time to try and get an in-browser test runner working. For this I have two goals:

Initially I was thinking that I would use the Gherkin tests directly from the book — by using some existing tool to parse them and provide hooks for wiring up the steps. But I’m not really finding anything like that out there. I found this approach which defines functions for each of the Gherkin prefixes, maps them to Mocha functions, which seems like a better approach.

Mocha also seems like a good choice for the test runner. And after a decent amount of trial and error I got it working how I want. I even got Eleventy’s dev server to reload the page when the code changes, which will be nice for development.

Remaining yak shaving tasks:

But at this point I would rather get started on the first test. This stuff has taken up way too much time already.