assertron

A supplementary assertion library

MIT License

Downloads
1.1K
Stars
4
Committers
8

Bot releases are hidden (Show)

assertron - v3.3.9

Published by unional almost 7 years ago

3.3.9 (2018-01-12)

Bug Fixes

assertron - v3.3.8

Published by unional almost 7 years ago

3.3.8 (2018-01-10)

Bug Fixes

assertron - v3.3.7

Published by unional almost 7 years ago

3.3.7 (2018-01-06)

Bug Fixes

assertron - v3.3.6

Published by unional almost 7 years ago

3.3.6 (2017-12-09)

Bug Fixes

  • revert NotSatisfied.toString() (4b16a5d)
assertron - v3.3.5

Published by unional almost 7 years ago

3.3.5 (2017-12-08)

Bug Fixes

assertron - v3.3.4

Published by unional almost 7 years ago

3.3.4 (2017-11-27)

Bug Fixes

assertron - v3.3.3

Published by unional almost 7 years ago

3.3.3 (2017-11-24)

Bug Fixes

  • loosen type checking for satisfy() (#53) (59a88b7)
assertron - v3.3.2

Published by unional almost 7 years ago

3.3.2 (2017-11-24)

Bug Fixes

assertron - v3.3.1

Published by unional almost 7 years ago

3.3.1 (2017-11-23)

Bug Fixes

Features

assertron - Improve measurement

Published by unional almost 7 years ago

Improve measurement code so that it will not fail on browsers, in case you are using assert-order on tests that runs on browsers (e.g. using karma).

assertron - Measurement

Published by unional almost 7 years ago

assert-order now also help you to keep track of how long it takes to execute some code.

const order = new AssertOrder()

// do some work

console.log(`${order.end()} ms have passed`)
assertron - New API

Published by unional almost 7 years ago

In this release, I completely rewrite AssertOrder to clean up its API.

Many improvements have been made to make the result more consistent.

Breaking changes

  • Step starts from 1 instead of 0
  • step(), all(), multliple(), some() are removed

New methods

  • atLeastOnce() (replacing some()), exactly() (replacing all(), multiple()), on(), onAny()
assertron - Add `multiple()` alias

Published by unional over 7 years ago

Add multiple() as alias to all()

assertron - Expose `next`

Published by unional almost 8 years ago

const order = new AssertOrder()

order.once(0)
order.next // === 1
assertron - Add promise support to `end(n)`

Published by unional almost 8 years ago

end() will now support putting in a timeout value and returns a promise if doing so.

it will simply wait for specified amount to time before validating the planned step is satisfied.

assertron - Add planning and multi-pass

Published by unional almost 8 years ago

Add planning support:

const a = new AssertOrder(3)
a.once(0)
a.once(1)
a.once(2)
a.end()

And multi-pass:

function odd() { a.any(1, 3, 5) }
function even() { a.any(0, 2, 4) }
const a = new AssertOrder()
even()
odd()
even()
odd()
even()
odd()
assertron - Add return values

Published by unional almost 8 years ago

any(), some(), all() and plan() will now return the current step so you can use that value in your test code to do other validations / logic.

assertron - Module name change

Published by unional almost 8 years ago

Publish as assert-order instead of @unional/assert-order for easier access.

assertron - Improve source map root

Published by unional almost 8 years ago

To /@unional/assert-order

assertron - Initial release

Published by unional almost 8 years ago

Support once(), step(), some(), any(), all(), plan().

Version to 1.1 directly as this is very simple and stable.