Home

Awesome

flug

The Test Runner with the Shortest Time to Takeoff

why flug?

flug is "flight" in German

features

background

There's a lot of awesome assertions libraries out there with a lot of awesome assertion functions. But the reality is that I have struggled to remember all the names of the assertion functions. Is it t.eq or t.is? Is it deepStrictEqual or strictDeepEqual? I needed a simpler, more memorable testing inteface, so I built Flug.

Flug exposes only one assertion function eq, which does deep equality checking. This solves 99.9% of my use cases, so that's good enough.

limitations

advanced usage

You can read more about advanced features here.

install

npm install flug

usage

const test = require("flug");

// simple sync usage
test("addition", ({ eq }) => {
  eq(1 + 1, 2);
});

// simple async usage
test("sleep", async ({ eq }) => {
  await sleep(5);
  eq(1 + 1, 2);
});

browser usage

<script src="https://unpkg.com/flug"></script>

<script>
  const { test } = flug;
  
  test("addition", ({ eq }) => {
    eq(1 + 1, 2);
  });  
</script>

And that's it!