Skip to content

Latest commit

 

History

History
240 lines (190 loc) · 10.2 KB

CHANGELOG.md

File metadata and controls

240 lines (190 loc) · 10.2 KB

Unreleased

0.13.4 (Jan 13, 2017)

  • Tweaks Must.prototype.be et al. implementation to prevent source-map-support from throwing an exception during call stack retrieval. This only happened if that module was used with Must.js for source map support.

0.13.3 (Jan 12, 2017)

  • Adds a first draft of TypeScript definitions.
    Thanks, Karl Purkhardt!
  • Serialize NaNs in objects in error messages as "[NaN]".

0.13.2 (Jul 20, 2016)

  • Fixes stringifying Symbols for assertion errors.
  • Stringifies RegExps nested in objects for assertion errors.
  • Adds symbol.
  • Adds properties.
  • Adds ownProperties.
  • Adds preliminary support for running under strict mode ("use strict").
    Assertion error stack traces will contain one Must.js function at the top at the moment. This will be fixed!

0.13.1 (Sep 26, 2015)

  • Adds custom error message to Must.

0.13.0 (Sep 26, 2015)

  • Lucky version. No changes since the previous release candidate.

0.13.0-rc1 (Sep 22, 2015)

  • Refactors eql to internally use Egal.js, which was extracted from Must.js.

    Must.js augments egal to continue to allow you to assert equivalence to NaNs and instances of classes that aren't value objects. Egal.js doesn't compare those out of the box as they're not things you want to do in production code.

    With the transition to Egal.js, eql now also supports value objects that return compound values. See Egal.js's README for details.

0.13.0-beta2 (Jun 15, 2015)

  • Fixes the stack trace when using promises with some particular matchers.

0.13.0-beta1 (Jun 15, 2015)

  • Adds must that returns self for those of us who sometimes write it twice:

    demand(undefined).must.be.undefined()
  • Fixes a false positive in eql when an object had some keys set to undefined.

  • Adds the for a fluent chain.

  • Changes boolean to not consider boxed boolean objects as booleans.

  • Changes number to not consider boxed number objects as numbers.

  • Changes string to not consider boxed string objects as strings.

  • Changes true and false to not consider boxed boolean objects as either true or false.

  • Adds resolve and reject for asserting on promises.
    The former is also aliased to then and [eventually] for different language styles.

    With Mocha, using this will look something like:

    it("must pass", function() {
      return Promise.resolve(42).must.resolve.to.equal(42)
    })

    Using CoMocha, it'll look like:

    it("must pass", function*() {
      yield Promise.resolve(42).must.resolve.to.equal(42)
      yield Promise.resolve(42).must.then.equal(42)
      yield Promise.reject(42).must.reject.and.equal(42)
    })
  • Adds with for a fluent chain.

  • Adds error to assert on errors.
    Similar to throw, but useful for when you already have an error at hand.

  • Adds startWith.

  • Adds endWith.

  • Adds nan to test NaN.

0.12.0 (May 28, 2014)

0.11.0 (Feb 13, 2014)

  • Works on other JavaScript engines besides V8 by not assuming Error.captureStackTrace. Thanks, Dmitry Starostin!

0.10.0 (Oct 31, 2013)

  • Allows asserting NaNs with eqlNaN.must.eql(NaN).

0.9.1 (Oct 31, 2013)

  • Fixes eql to consider two equivalent boxed Boolean, Number or String values eql.
    Previously it only did so if both were primitive (42) or only one was boxed (new Number(42)).

0.9.0 (Oct 28, 2013)

  • Adds between to assert that a value is between a range.

0.8.0 (Oct 27, 2013)

  • Allows asserting and comparing circular and self-referential objects with eql. Objects that are self-referential in the exact same way are considered eql.
  • Displays circular and self-referential objects and arrays in assertion error messages properly.
  • Displays object's inherited properties in assertion error messages.

0.7.0 (Oct 23, 2013)

  • Adds contain as an alias of include.

  • Adds before as an alias of below to make comparing dates read more natural:

    new Date(2000, 5, 18).must.be.before(new Date(2001, 0, 1))
  • Adds after as an alias of above to make comparing dates read more natural:

    new Date(2030, 5, 18).must.be.after(new Date(2013, 9, 23))

0.6.0 (Oct 15, 2013)

  • Allows asserting both the exception constructor and its message together in the throw matcher:

    someFunction.must.throw(RangeError, /out of bounds/)

0.5.0 (Oct 13, 2013)

  • Sets the eql matcher's AssertionError diffable so some test runners would print out a property-by-property diff for mismatches. This helps visual comparison.

0.4.0 (Oct 11, 2013)

  • Changes eql so it also compares instances of the same class recursively like it does with plain objects.
    If the instance has a valueOf function, however, its output is used as before.

0.3.0 (Oct 5, 2013)

  • Allows asserting property and ownProperty on all types (such as functions, booleans etc.), not only objects.
  • Allows asserting keys and ownKeys on all types (such as functions, booleans etc.), not only objects.
  • Allows asserting enumerable and nonenumerable properties on all types (such as functions, booleans etc.), not only objects.

0.2.0 (Sep 26, 2013)

  • Fails gracefully if property matchers (property, enumerable etc.) are used on non-objects.
  • Adds the keys matcher to test if an object has all the expected keys.
    Takes inherited keys into account just like the empty and property matchers.
  • Adds the ownKeys matcher to test if an object has all the expected keys of its own.

0.1.338 (Sep 26, 2013)

0.1.337 (Sep 24, 2013)

  • First release. Must-have!