Assert array equivalency

The `compareArray` utility function returns a boolean value describing
whether or not the input arrays are equivalent--it does not throw an
exception when invoked with non-equivalent arrays. Prior to this commit,
however, two tests invoked `compareArray` without inspecting its return
value, so it had no impact on the result of the test.

Update the tests to fail when the "expected" and "actual" arrays are not
equivalent.
This commit is contained in:
Mike Pennisi 2021-10-01 16:48:40 -04:00 committed by Rick Waldron
parent 43c68163c0
commit c44cee291a
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ Promise.all([
return checkSequence(sequence, 'Expected to be called second.');
})
]).then(result => {
compareArray(result, [true, true, true]);
assert.compareArray(result, [true, true, true]);
assert.sameValue(sequence.length, 5);
checkSequence(sequence);
}).then($DONE, $DONE);

View File

@ -44,7 +44,7 @@ Promise.all([
return checkSequence(sequence, 'Expected to be called second.');
})
]).then(result => {
compareArray(result, [true, true, true]);
assert.compareArray(result, [true, true, true]);
assert.sameValue(sequence.length, 5);
checkSequence(sequence)
}).then($DONE, $DONE);