Krasimir is the creator of miss-piggy, a small test runner for Puppeteer. We caught up with him to ask a few questions:
How would you describe Miss Piggy?
It’s a tiny layer on top of Puppeteer that comes with a friendly declarative API. Under the hood it uses Puppeteer to visit pages, do clicks, fill forms, basically simulating user interaction. Then it runs expectations on the page’s source code, page’s url, http requests and Google’s dataLayer.
Where did you get the idea for the name ‘Miss Piggy’?
Well, Kermit was taken 🙂 I wanted the name close to “puppeteer” and as a kid I loved Sesame Street show so I started checking which of its characters was available as an npm name. It looked like most of them were taken(!) So, I came up with “miss-piggy“.
Did you learn anything from building Miss Piggy that you might not have if you’d used something like jest-puppeteer instead?
Oh, yes for sure. I believe that every little thing that we are doing is a learning experience. jest-puppeteer would probably save me from building my own test runner. So I guess I sharpen my skills in that direction. But also, in this project, I learned more about Puppeteer and its API.
Are you planning to create any other libraries using the same simple, minimalist approach as Miss Piggy?
Actually, last couple of years I’m trying to write as less code as possible. That’s not because I don’t like coding. It’s because I don’t like complex code. To achieve such goals I have to work with libraries that have minimalistic and at the same time powerful APIs. I expect this from the other people so I can’t avoid doing it myself. Everything that I’ll eventually open-source will (I hope) follow the same approach. Doing one thing and doing it well.