how to assert json returned from promise with chai?
<p>I'm trying to write a test for a json returned from a promise.
I created this simple code so you can try to reproduce:</p>

<pre><code>"use strict";
var chai = require("chai");
chai.should();
var chaiAsPromised = require("chai-as-promised");
var chaiJsonEqual = require('chai-json-equal');
chai.use(chaiAsPromised);
chai.use(chaiJsonEqual);
var expect = chai.expect;

describe('should', function() {

  it('return true because its the same json object', function() {
    var json = {  "foo": "bar" };
    return expect(Promise.resolve(json)).to.eventually.jsonEqual(json);
  });

});
</code></pre>

<p>but i get:</p>

<pre><code>  1) should return true because its the same json object:
     AssertionError: expected {} to have the same json representation as { foo: 'bar' }
</code></pre>

<p>chai-as-promised and chai-json-equal works seperatly, but not together.
Do you guys have a solution for this, workaround or other libraries I can use?</p>