Skip to content

oselvar/var-examples

Repository files navigation

Vár examples

Small, standalone sample projects that run Markdown specs as tests with Vár — one project per language/test-framework combination. Each is a complete project you can copy as the starting point for your own.

The .md files at each project's root are the specs — plain Markdown prose that runs as tests. They are first-class: readable by anyone, owned by the whole team, and checked against the code on every test run.

Project Stack Run with CI
typescript-vitest TypeScript + vitest pnpm test typescript-vitest
kotlin-junit Kotlin + JUnit + Gradle ./gradlew test kotlin-junit
kotlin-kotest Kotlin + Kotest + Gradle ./gradlew test kotlin-kotest
java-junit-maven Java + JUnit + Maven mvn test java-junit-maven
java-junit-gradle Java + JUnit + Gradle ./gradlew test java-junit-gradle
python-pytest Python + pytest uv run pytest python-pytest
python-unittest Python + unittest uv run python -m unittest python-unittest
ruby-rspec Ruby + RSpec bundle exec rspec ruby-rspec
ruby-minitest Ruby + Minitest bundle exec rake test ruby-minitest

typescript-vitest implements the full example set; the other projects implement a feature-covering subset — hello-var (basic steps), deep-thought (a one-sensor spec), tables-and-docstrings (whole tables + doc strings), yahtzee and roman-numerals (header-bound table rows), and library (custom parameter types that pair parse with format, so a mismatch renders in the document's own notation — money, dates, and an emphasised title where the markup is the parameter).

Where these files live

The source of truth is the oselvar/var monorepo's examples/ directory, where the projects run against the local build on every push (in there, the subset projects' .md files are symlinks to the typescript-vitest originals). On every release they are synced — symlinks resolved, versions pinned to the release — to oselvar/var-examples. Send changes to oselvar/var.

About

Runnable Vár sample projects — Markdown specs as tests, one project per language/test framework

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors