Open Source Projects

Architecture, motivation, and practical examples of the libraries I publish on npm and GitHub under open licenses.

Co-Gherkin

Brings Gherkin syntax (Given-When-Then) to Vitest for unit and integration tests, and to Playwright for end-to-end tests. Published on npm under the MIT license.

In modern TypeScript projects, teams adopting BDD (Behavior-Driven Development) often hit friction: Cucumber.js requires its own test runner separate from Vitest, while other tools only cover Playwright end-to-end tests. Co-Gherkin bridges both worlds with a lightweight, typed, native API.

Built in TypeScript with zero heavy dependencies, it decouples the .feature file parser from the runner adapter. It compiles Gherkin scenarios (Given / When / Then / And, Background, and Scenario Outline with Examples tables) into native Vitest or Playwright blocks, automatically extracting typed parameters ({int}, {float}, {string}).

  • Native dual support: run the exact same Gherkin syntax in Vitest unit/integration tests and Playwright E2E flows.
  • Automatic extraction of Cucumber expressions ({int}, {float}, {string}, {word}) as well as DataTables and Scenario Outlines.
  • Full dogfooding: the library tests itself using its own Gherkin specifications with over 99% coverage.
  • Zero complex setup: import directly inside .test.ts or .spec.ts files while keeping your runner mocks, hooks, and parallelism.

Code · npm package