GitXplorerGitXplorer
d

referee-more-assertions

public
2 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
87dfcd7b8225e18cd90e05d7593e8ef810142548

Update README

ddavidaurelio committed 11 years ago
Unverified
3e65b044b9be5457ef704b1948aa782af74ce77f

Repackage for referee, change test framework to mocha

ddavidaurelio committed 11 years ago
Unverified
16f5e32a7fa3b24de33928ced3715fb9f0b60af0

0.1.3

ddavidaurelio committed 11 years ago
Unverified
c5dba67924b9492b2dc53df9fb2dad68558b63d0

Update to newest buster, make it work again

ddavidaurelio committed 11 years ago
Unverified
53e85849714923126e97a85c869fcaf0cd11ce82

0.1.2

ddavidaurelio committed 11 years ago
Unverified
6ec383a5e4954dd2e54d41f704bf36cf14332996

Add `containsString()`

ddavidaurelio committed 11 years ago

README

The README file for this repository.

referee-more-assertions

Additional assertions for referee.

Matchers

At the moment, only matchers for arrays and array-like objects are provided.

Array / Sequence Matchers

Contains by Identity (===)

Similar to assert.contains, the following assertions are provided:

  • assert.containsOnce(array, element) passes if array contains element exactly once.

  • assert.containsInOrder(array, a, b, c, ...) passes if array contains all passed-in values in that order.

Contains by Match

The following assertions check for matching elements. See the documentation of assert.match to understand how referee matches.

  • assert.containsMatch(array, matcher) passes if any element in array matches matcher.

  • assert.containsMatchOnce(array, matcher) passes if exactly one element in array matches matcher.

  • assert.containsMatchesInOrder(array, matcherA, matcherB, ...) passes if elements matching the passed-in matchers are contained in the given order.

Contains by Equality

These assertions check sequence elements by equality. Read the documentation of assert.equals to understand how referee checks for equality.

  • assert.containsEqual(array, value) passes if any element in array equals value.

  • assert.containsEqualOnce(array, value) passes if exactly one element in array equals value.

  • assert.containsEqualsInOrder(array, valueA, valueB, ...) passes if elements equaling the passed-in values are contained in the given order.

Contains Substring

This assertion checks whether a string (or string representation of an object) contains a substring.

Contribute

Contributions welcome! Please make sure that your assertion functions are properly tested. Don’t test assert.myAssert(), but only the assertion function.