Creating a Test Runner: What Happens Behind the Tests?

This ad is not shown to multipass and full ticket holders
JS Nation
JSNation 2026
June 11 - 15, 2026
Amsterdam & Online
The main JavaScript conference of the year
Upcoming event
JSNation 2026
JSNation 2026
June 11 - 15, 2026. Amsterdam & Online
Learn more
Bookmark
Rate this content
Sentry
Promoted
Code breaks, fix it faster

Crashes, slowdowns, regressions in prod. Seer by Sentry unifies traces, replays, errors, profiles to find root causes fast.

What's it like to create a test runner from scratch? More than that: how do you test a test runner?

In this talk, I break down Poku, a test runner that makes testing easy for Node.js, Bun, Deno, and you.

You will learn about the power of subprocesses, isolation, and the advantages of working with concurrency. All of this using only native language features.

You will also understand how it is possible, in less than 200kB, to create a complete test runner and run the same test suite through all JavaScript runtimes for backend.

This talk has been presented at Node Congress 2026, check out the latest edition of this JavaScript Conference.

FAQ

Wesley is the speaker and creator of a new test runner, sharing his insights and experiences in the field.

The test runner was created to handle diverse runtimes, ensure compatibility, and simplify the testing process for developers, especially beginners.

Current test runners may not run consistently across different runtimes, and configuring them can be complex and confusing, especially for beginners.

The Mishbang paradox involves using a CLI to run a binary, like Node.js, and the challenges it presents in test isolation and execution.

The test runner simplifies configurations, works across all runtimes, and aligns testing processes more closely with natural JavaScript coding, making it beginner-friendly.

These hooks are used to indicate actions that should occur before and after tests, helping to manage asynchronous operations and improve test clarity.

It optimizes resource usage by managing subprocesses efficiently, preventing overload, and ensuring tests are run in a concurrent manner.

Standardization ensures that tests behave consistently regardless of the runtime, minimizing errors and improving reliability.

The test runner reduces the learning curve by using familiar JavaScript syntax, providing clear assertions, and minimizing configuration complexity.

The motivation comes from solving existing problems, improving developer experience, and meeting the needs of developers seeking simpler solutions.

Weslley Araújo
Weslley Araújo
17 min
26 Mar, 2026

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Hey everyone, Wesley introduces unique cache runners. Creating a test runner from scratch to understand application workings with different models like BAM and Gnu. Testing scenarios reveal errors with Node.js and model definitions. BAM issues arise from gestures and mishbang conflicts while running tests. Isolation problems occur as gest loses context between runtimes. Common conflicts in test processing modes affect CLI projects and workers, posing challenges for project maintenance and runtime compatibility. Complexity of test dependencies across various runtimes challenges test runners. Emphasis on precise testing aligned with JavaScript coding philosophy. Configuration complexities for beginners in setting up tests with specific extensions and experimental features. Understanding Jest behavior and challenges in aligning test flows with JavaScript. Confusion for beginners in test execution sequencing and expectations. Importance of creating boilerplates for test execution control. Creating a custom test runner to support different runtimes and simplify testing processes. Importance of understanding the challenges faced by junior developers in test setup. Implementing a procedural approach to test execution across various runtimes. Creating subprocesses to run files across various runtimes, ensuring tests run consistently. Implementing a test executor to handle runtimes and subprocess creation efficiently. Enhancing performance by managing test files, concurrency, resource allocation, and memory usage. Introducing assert in testing for user simplicity and efficient reporting. Emphasizing developer experience and the philosophy behind project creation.

1. Understanding Cache Runners and Test Creation

Short description:

Hey everyone, Wesley introduces unique cache runners. Creating a test runner from scratch to understand application workings with different models like BAM and Gnu. Testing scenarios reveal errors with Node.js and model definitions.

Hey everyone, it's a pleasure to be here. And today I will show you how some of the most popular Cache runners work behind the scenes. And who is Wesley? Well, I am Wesley, nice to meet you. And who is our dinner pick? Well, choose both and you'll choose a little different cache runner of the usual.

So, why I create a test runner from scratch? Let's go back in the timing first. Before we had TypeScript and Node, but now the language involved in its ecosystem. We need to understand how our applications that come from Node 8 works with BAM, with Gnu, etc. And that is a good example.

I just checked if Gnu version is a springy, but using just Gnu and AR models, and it will fail. But, ok, you don't need to read it. And, but look at this error. Just installed an unexpected token. Look, this is a really simple test, and the error is really large. It's because it just needs to use an experimental feature of Node.js to run an AR model file.

While Gnu is an AR model by default. It will also happen with BAM. Now, let's run a test that will run, but not exactly work. A test really simple again. In this case, we are just checking for BAM version as a springy. But, the error is different now. As CommonJS is natural for gestures in this case, we can see a different reason now. BAM is not defining. Ok, but check the comment here.

2. Challenges with BAM and Gest in Test Processing

Short description:

BAM issues arise from gestures and mishbang conflicts while running tests. Isolation problems occur as gest loses context between runtimes. Common conflicts in test processing modes affect CLI projects and workers, posing challenges for project maintenance and runtime compatibility.

BAM is calling gestures. How BAM is not defining? There are two main reasons for that. The first one is mishbang. Mishbang works like I need to define a CLI to run with a binary. For example, I want my JS file run with Node.js, and even if I don't call Node.js to execute this file. For example, the stage.node.nodemodels.gest is a line on JS, I can just run gest. This is the magic of Mishbang. But, it comes with a paradox.

BAM, gest. BAM, call, gest. Gest, being a, calls Node.js Mishbang. So, what is really wrong with this? Now, that is a superficial example of how gest works behind the scenes. It creates a virtual machine context to isolate the test. So, this isolation is a problem. Because, gest is in fact run via BAM or Dyna. But, when it passes the test to a VM, it does propagate the BAM.

As gest runs via Node.js Mishbang, it loses the context in the process of isolating the test. It brings a complex conflict because gest is running really with the runtime or colored it. But, test itself probably is run via Node.js. And, it is like, well, it's like defining the test. So, there are some conflicts in the test processing mode. So, I show gest because it is really popular. But, it happens mostly with all the CLI projects, not only for test runners. And, it also happens with workers. So, for me, it is a real problem because I maintain a lot of projects. And, I really want my project to work with all runtimes. And, I want to ensure it uses a test switch that runs across all of them using the same test switch. And, one more point. The dependency graphic is really hard for me.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Remix Flat Routes – An Evolution in Routing
Remix Conf Europe 2022Remix Conf Europe 2022
16 min
Remix Flat Routes – An Evolution in Routing
Top Content
Remix Flat Routes is a new convention that aims to make it easier to see and organize the routes in your app. It allows for the co-location of support files with routes, decreases refactor and redesign friction, and helps apps migrate to Remix. Flat Folders convention supports co-location and allows importing assets as relative imports. To migrate existing apps to Flat Routes, use the Remix Flat Routes package's migration tool.
How to Make a Web Game All by Yourself
JS GameDev Summit 2023JS GameDev Summit 2023
27 min
How to Make a Web Game All by Yourself
This talk guides you on how to make a web game by yourself, emphasizing the importance of focusing on tasks that interest you and outsourcing the rest. It suggests choosing a game engine that allows distribution on the web and aligns with your understanding and enjoyment. The talk also highlights the significance of finding fun in the creative process, managing scope, cutting features that don't align with the game's direction, and iterating to the finish line. It concludes by discussing the options for publishing the game on the web and leveraging unique web features.
Atomic Deployment for JS Hipsters
DevOps.js Conf 2024DevOps.js Conf 2024
25 min
Atomic Deployment for JS Hipsters
This Talk discusses atomic deployment for JavaScript and TypeScript, focusing on automated deployment processes, Git hooks, and using hard links to copy changes. The speaker demonstrates setting up a bare repository, configuring deployment variables, and using the post-receive hook to push changes to production. They also cover environment setup, branch configuration, and the build process. The Talk concludes with tips on real use cases, webhooks, and wrapping the deployment process.
Your GraphQL Groove
GraphQL Galaxy 2022GraphQL Galaxy 2022
31 min
Your GraphQL Groove
The Talk discusses the value proposition of GraphQL and its ability to solve common pain points in API development. It highlights the importance of making informed decisions when choosing GraphQL clients, servers, and schema builders. The Talk also emphasizes the need to focus on the best developer experience in the present rather than seeking a perfect long-term solution. Additionally, it mentions the future of the Urkel GraphQL client and the reasons for dropping ReScript support. Overall, the Talk provides insights into the current state and future trends of GraphQL development.
Full-stack & typesafe React (+Native) apps with tRPC.io
React Advanced 2021React Advanced 2021
6 min
Full-stack & typesafe React (+Native) apps with tRPC.io
Top Content
Alex introduces tRPC, a toolkit for making end-to-end type-safe APIs easily, with auto-completion of API endpoints and inferred data from backend to frontend. tRPC works the same way in React Native and can be adopted incrementally. The example showcases backend communication with a database using queries and validators, with types inferred to the frontend and data retrieval done using Prisma ORM.
Using UDP in the Browser for faster Client/Server Connections
JS GameDev Summit 2023JS GameDev Summit 2023
21 min
Using UDP in the Browser for faster Client/Server Connections
Top Content
This talk introduces geckos.io, a real-time client-server communication library using UDP and WebRTC. The speaker discusses the benefits of UDP for real-time multiplayer games and explains how geckos.io enables UDP connections between browsers and Node.js servers. The deployment process for geckos.io involves opening UDP ports and handling signaling through an HTTP request. The speaker demonstrates how geckos.io works with Docker and showcases the ability to host multiple servers on the same machine. Overall, this talk provides an overview of geckos.io and its applications in real-time communication.

Workshops on related topic

Integrating LangChain with JavaScript for Web Developers
React Summit 2024React Summit 2024
92 min
Integrating LangChain with JavaScript for Web Developers
WorkshopFree
Vivek Nayyar
Vivek Nayyar
Dive into the world of AI with our interactive workshop designed specifically for web developers. "Hands-On AI: Integrating LangChain with JavaScript for Web Developers" offers a unique opportunity to bridge the gap between AI and web development. Despite the prominence of Python in AI development, the vast potential of JavaScript remains largely untapped. This workshop aims to change that.Throughout this hands-on session, participants will learn how to leverage LangChain—a tool designed to make large language models more accessible and useful—to build dynamic AI agents directly within JavaScript environments. This approach opens up new possibilities for enhancing web applications with intelligent features, from automated customer support to content generation and beyond.We'll start with the basics of LangChain and AI models, ensuring a solid foundation even for those new to AI. From there, we'll dive into practical exercises that demonstrate how to integrate these technologies into real-world JavaScript projects. Participants will work through examples, facing and overcoming the challenges of making AI work seamlessly on the web.This workshop is more than just a learning experience; it's a chance to be at the forefront of an emerging field. By the end, attendees will not only have gained valuable skills but also created AI-enhanced features they can take back to their projects or workplaces.Whether you're a seasoned web developer curious about AI or looking to expand your skillset into new and exciting areas, "Hands-On AI: Integrating LangChain with JavaScript for Web Developers" is your gateway to the future of web development. Join us to unlock the potential of AI in your web projects, making them smarter, more interactive, and more engaging for users.
Managers Are From Mars, Devs Are From Venus
TechLead Conference 2024TechLead Conference 2024
111 min
Managers Are From Mars, Devs Are From Venus
Workshop
Mo Khazali
Mo Khazali
A Developer’s Guide to Communicating, Convincing, and Collaborating Effectively With Stakeholders
It’s a tale as old as time - collaboration between developers and business stakeholders has long been a challenge, with a lack of clear communication often leaving both sides frustrated. The best developers can deeply understand their business counterparts’ needs, effectively communicate technical strategy without losing the non-technical crowd, and convince the business to make the right decisions. Working at a consultancy, I’ve both failed and succeeded in architecting and “selling” technical visions, learning many lessons along the way.Whether you work at a product company, are a consultant/freelancer, or want to venture beyond just being a developer, the ability to convince and clearly communicate with stakeholders can set you apart in the tech industry. This becomes even more important with the rise of GenAI and the increasingly competitive developer market, as problem-solving and effective communication are key to positioning yourself.In this workshop, I’ll share real-world examples, both good and bad, and guide you through putting the theory into practice through dojos.
How to create editor experiences your team will love
React Advanced 2021React Advanced 2021
168 min
How to create editor experiences your team will love
Workshop
Lauren Etheridge
Knut Melvær
2 authors
Content is a crucial part of what you build on the web. Modern web technologies brings a lot to the developer experience in terms of building content-driven sites, but how can we improve things for editors and content creators? In this workshop you’ll learn how use Sanity.io to approach structured content modeling, and how to build, iterate, and configure your own CMS to unify data models with efficient and delightful editor experiences. It’s intended for web developers who want to deliver better content experiences for their content teams and clients.