mozilla-b2g/gaia — pull request #23561 by sv99 (2014-09-01 08:48:46+00:00)
Title: unittests test-agent add chai expect and should interface

Some unit tests use assert.include for testing existing methods in created objects.

chai.js:1609
/**
* # .include(value, includes, [message])
*
* Assert the inclusion of an object in another. Works
* for strings and arrays.
*
* assert.include('foobar', 'bar', 'foobar contains string `var`);
* assert.include([ 1, 2, 3], 3, 'array contains value);
assert.include = function (exp, inc, msg) {
var obj = new Assertion(exp, msg);

if (Array.isArray(exp)) {
obj.to.include(inc);
} else if ('string' === typeof exp) {
obj.to.contain.string(inc);
}
};
for object this method do nothing!!

For example - changed apps/clock/test/unit/picker/picker_test.js
assert.include(Picker.prototype, 'reset');
assert.include(Picker.prototype, 'reset1'); - assert OK!!!