Skip to content

lolmaus/assertron

Repository files navigation

assertron

Run assertions against your objects. Define contracts with a handy DSL. Test your code inline.

Travis build status Code Climate Test Coverage Dependency Status devDependency Status

Idea

Assertron lets you run assertions against objects via a convenient DSL:

import {assert as A} from 'assertron';

function myFunc(foo, bar) {
  A(foo, {object: true});

  A(bar, {
    optional: true,
    or: {
      number: {
        min: 3,
        max: 10,
        orString: true
      },
      function: true
    }
  })


  /* Your function's code here */
}

About

Run assertions against your objects. Define contracts with a handy DSL. Test your code inline.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published