BUG 1061290 chai add interfaces expect and should

Now available only assert interface from chai assertion library.

In assert interface not available methods for testing property. Same unit tests used for in assert.include - this assert worked only for strings and Arrays, for objects this method in used version chai do nothing.



Tue, 02 Sep 2014 01:18:44 -0700 от Yuren Ju <notifications@github.com>:
>In dev_apps/test-agent/common/test/helper.js:
>> @@ -111,6 +111,8 @@
>      chai.Assertion.includeStack = true;
>      patchChai(chai.Assertion);
>      window.assert = chai.assert;
> +    window.expect = chai.expect;
> +    window.should = chai.should();
>Supposedly it should be should instead of should(),  @sv99 , is this a typo? 
>—
>Reply to this email directly or  view it on GitHub . common/vendor/chai/chai.js 
66:* ### BDD Style Introduction
 *
 * The BDD style is exposed through `expect` or `should` interfaces. In both
 * scenarios, you chain together natural language assertions.
 *
 *      // expect
 *      var expect = require('chai').expect;
 *      expect(foo).to.equal('bar');
 *
 *      // should
 *      var should = require('chai').should();
 *      foo.should.equal('bar');

Sample uncorrect using assert.include in  apps/clock/test/unit/picker/picker_test.js
assert.include(Picker.prototype, 'reset');

Picker.prototype - object? for object assert.include do nothing

assert.include(Picker.prototype, 'reset');
assert.include(Picker.prototype, 'reset1'); // assert OK !!!

expect(Picker.prototype).to.have.property('reset');
Picker.prototype.should.have.property('reset');

С уважением, Волков Вячеслав!