mpn-lookup (npm library) npm TypeScript

Project Code

npm version CI npm downloads

A small, typed TypeScript library for Most Probable Number (MPN) lookups on IDEXX Quanti-Tray, Quanti-Tray/2000 and Legiolert water tests. You pass in positive well counts and get back the MPN and its 95% confidence interval, so you don’t need the printed reference tables. Both apps below are built on it.

The lookup tables are the critical part, so the project guards them:

  • A checksum test hashes every lookup result and fails the build if any value changes. A separate CI job rejects any PR that touches the table data or that test.
  • Inputs are validated: an out-of-range or non-integer count returns undefined and never an unrelated table entry. The tables are frozen at runtime so callers can’t corrupt them.
  • Releases build CJS and ESM bundles with type declarations. They’re published from GitHub releases through npm trusted publishing (OIDC, no stored tokens) with provenance, and each version waits for 2FA approval before it goes live.
  • Dependabot keeps dependencies current, and a Claude Code agent in GitHub Actions fixes Dependabot PRs whose CI fails, under the same rules: it can’t touch the table data, the checksum test or the workflows.

MPN Lookup NextJS TypeScript

Live Demo Project Code

Playwright Tests Node.js CI Deploy

A mobile-sized web app built on the mpn-lookup library. Choose a test type, enter the positive well counts, and it shows the MPN with its 95% confidence interval. It’s a static Next.js export deployed to GitHub Pages, and I built it to practice testing a React app at every layer:

  • Component tests (Jest + React Testing Library): the Home view’s navigation, and the LookupComponent’s input handling and results for each test type
  • End-to-end tests (Playwright): run in Chromium, Firefox and WebKit, covering the menu flows, each calculator screen, and page metadata such as the favicon and link preview tags
  • Data integrity: a checksum test hashes every lookup the app displays, so a dependency update that changes a published MPN value fails CI

MPN Lookup Native App React Native TypeScript

Tests (jest)

The web app above, rebuilt in React Native and used as the target application for a mobile test automation suite. The project includes a migration from Detox (the original E2E framework) to Appium, implemented in both Python (pytest + Appium Python Client) and TypeScript (WebdriverIO).

The Python suite uses a page object model built on pytest fixtures, covering all three calculator screens (QuantiTray, QuantiTray2000, Legiolert) with data-driven assertions derived from the original Detox test cases. The TypeScript suite implements the same coverage using WebdriverIO with typed page objects. Both suites support Android and iOS via configurable Appium capabilities and are structured for CI integration.


Jonny’s Bikes NextJS Apache ECharts Badge TypeScript

Project Code
Playwright Tests Deploy

A very simple SPA that started out as a NextJS app using Django as the middleware, and Postgres as the backend datasource. The data set is a list of bikes and a few frames that I have collected over the years. Once I got the initial draft of the app written, I refactored it to be a SPA using a json file in place of PostgreSQL & Django, so I could more easily host it on GitHub Pages and implement some e2e tests for practice.

The interesting tests in this project from my perspective are the tests for the echarts, which were a little tricky to validate, but I found a working pattern to follow and was able to add component tests for the PieCharts. The other testing, relating to Django and PostgreSQL, aren’t relevant to this project so not included.


ApiTestFrameworkMocha Mocha Chai TypeScript

API tests demo

Demonstration of API testing using Mocha, Chai, and TypeScript. The tests are simple, but the framework is set up to be easily expanded upon.


Consumer Driven Contract Testing with Pact Pact JavaScript

Build

Consumer and provider implementations of contract testing using PactV3 and PactFlow. The consumer defines interaction contracts — expected requests and responses — which are verified independently against the provider without requiring both services to be running simultaneously.

This pattern is particularly valuable in microservices and API-driven architectures where provider changes can silently break consumers. The suite uses given() state setup, matcher-based response validation, and PactFlow for contract publication and verification in CI.


Pytest validation of Snowflake database loading Snowflake Python Pytest

I’ve been doing data validation work for a long time and I wanted to try some of the newer tools on the market.
This simple example copies the tables from the PostgreSQL sample database dvdrental to a Snowflake instance, hosted on AWS in my case. These tests are just some simple validation used to check that the data was copied correctly.