add missing vars

This commit is contained in:
Aleksey Shvayka 2017-09-06 22:18:25 +03:00
parent 529d395fa0
commit 6586e2dcbe
2 changed files with 9 additions and 4 deletions

View file

@ -1142,6 +1142,7 @@ module.exports = function (chai, _) {
, ssfi = flag(this, 'ssfi')
, objType = _.type(obj).toLowerCase()
, nType = _.type(n).toLowerCase()
, errorMessage
, shouldThrow = true;
if (doLength) {
@ -1238,6 +1239,7 @@ module.exports = function (chai, _) {
, ssfi = flag(this, 'ssfi')
, objType = _.type(obj).toLowerCase()
, nType = _.type(n).toLowerCase()
, errorMessage
, shouldThrow = true;
if (doLength) {
@ -1333,6 +1335,7 @@ module.exports = function (chai, _) {
, ssfi = flag(this, 'ssfi')
, objType = _.type(obj).toLowerCase()
, nType = _.type(n).toLowerCase()
, errorMessage
, shouldThrow = true;
if (doLength) {
@ -1428,6 +1431,7 @@ module.exports = function (chai, _) {
, ssfi = flag(this, 'ssfi')
, objType = _.type(obj).toLowerCase()
, nType = _.type(n).toLowerCase()
, errorMessage
, shouldThrow = true;
if (doLength) {
@ -1524,6 +1528,7 @@ module.exports = function (chai, _) {
, objType = _.type(obj).toLowerCase()
, startType = _.type(start).toLowerCase()
, finishType = _.type(finish).toLowerCase()
, errorMessage
, shouldThrow = true
, range = (startType === 'date' && finishType === 'date')
? start.toUTCString() + '..' + finish.toUTCString()

View file

@ -132,8 +132,8 @@ describe('utilities', function () {
});
it('addMethod returns new assertion with flags copied over', function () {
assertion1 = expect('foo');
assertion2 = assertion1.to.returnNewAssertion();
var assertion1 = expect('foo');
var assertion2 = assertion1.to.returnNewAssertion();
// Checking if a new assertion was returned
expect(assertion1).to.not.be.equal(assertion2);
@ -413,8 +413,8 @@ describe('utilities', function () {
});
it('addProperty returns a new assertion with flags copied over', function () {
assertion1 = expect('foo');
assertion2 = assertion1.is.thing;
var assertion1 = expect('foo');
var assertion2 = assertion1.is.thing;
// Checking if a new assertion was returned
expect(assertion1).to.not.be.equal(assertion2);