Skip to content

Try Varar in your browser

In this tutorial we’ll read an oath, break it, mend it, and then break it from the other side. The interactive example uses TypeScript, because we can run that in the browser.

You can select a different language in the top-right corner of the page, but you won’t be able to edit the code.

  1. Read the oath below

    The deep-thought.md file is ordinary Markdown prose — no special syntax, no keywords. One sentence in it makes a checkable claim, or an oath.

  2. Break the oath

    Change 42 to 41 in the deep-thought.md file. Now the oath is broken. You can see the red squiggly line under the word 41. Hover over it to see the expected value.

  3. Mend the oath

    Change 41 back to 42 in the deep-thought.md file. Now the oath is mended.

  4. Break it from the other side

    Change 42 to 41 in the deep-thought.steps.ts file. Now the oath is broken from the other side.

This is the whole idea of Varar: the document and the code check each other. When they disagree, your tests fail, and the failure points at the words.

  • A Varar spec is plain Markdown. You read it like documentation, because it is documentation.
  • A sensor returns what the software actually does; Varar compares that against what the document claims.
  • When document and code disagree — no matter which side drifted — the failure is anchored to the exact span in the document.

Ready to run Varar on your own machine? Get started on your computer — install, scaffold your first oath, and watch it fail on purpose.