Expose the util package through the chai object #335

Merged
merged 1 commit into from Jan 2, 2015

Projects

None yet

2 participants

@DingoEatingFuzz
Contributor

The util object has a lot of helpful functions in it that would be nice to use outside the context of assertions.

For instance, if you want to check deep equality without breaking when false.

if (chai.util.eql(obj1, obj2)) {
  // do more things
} else {
  // do other things instead of having a failing assertion
}
@DingoEatingFuzz DingoEatingFuzz Expose chai util through the chai object
The chai util object has a lot of useful functions that can be used
outside of the context of assertions.
ebcfd87
@keithamus
Member

Hi @DingoEatingFuzz, thanks for the pull request! Seems like a fairly straightforward addition, and I don't have much problem with that.

Having said that I can't merge it just yet, because of commit b4614da. Can you please remove this commit - as we'll generate a new build JS file when we publish a new version.

@DingoEatingFuzz
Contributor

Yep, I can remove that. I wasn't sure what the deal with new builds was.

@keithamus
Member

Sorry about that @DingoEatingFuzz; I'll clear this up in the contrib guidelines soon (see #336)

@DingoEatingFuzz
Contributor

No worries. The commit is gone now 👍

@keithamus keithamus merged commit 7e3da21 into chaijs:master Jan 2, 2015

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@keithamus
Member

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment