From f31589998d910aae0bfeffed709bf42650e874ee Mon Sep 17 00:00:00 2001 From: Jacob Danton Date: Sun, 26 Apr 2015 08:53:30 -0700 Subject: [PATCH] Updating Chai to have "Include" in "Deep" Reference: https://github.com/chaijs/chai/blob/master/lib/chai/core/assertions.js#L1452 --- chai/chai-tests.ts | 5 +++++ chai/chai.d.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/chai/chai-tests.ts b/chai/chai-tests.ts index 98d75e8aef..ddaa84ee28 100644 --- a/chai/chai-tests.ts +++ b/chai/chai-tests.ts @@ -337,6 +337,11 @@ function deepEqual3(Date) { expect(a).not.to.deep.equal({}); } +function deepInclude(val) { + expect(['foo', 'bar']).to.deep.include(['bar', 'foo']); + expect(['foo', 'bar']).not.to.deep.equal(['foo', 'baz' ]); +} + function empty() { function FakeArgs() { }; FakeArgs.prototype.length = 0; diff --git a/chai/chai.d.ts b/chai/chai.d.ts index 4b9d313dd2..dd0adf9740 100644 --- a/chai/chai.d.ts +++ b/chai/chai.d.ts @@ -132,6 +132,7 @@ declare module chai { interface Deep { equal: Equal; + include: Include; property: Property; }