Skip to content
Run assertions against your objects. Define contracts with a handy DSL. Test your code inline.
JavaScript HTML
Branch: generation-2
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.babelrc
.codeclimate.yml
.editorconfig
.eslintignore
.eslintrc
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
gulpfile.js
package.json

README.md

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 */
}
You can’t perform that action at this time.