Tests: Fixed bug in displayed assertion
This `displayed` assertion had a bug that was causing it to not actually check anything (it was using obj.length instead of data_cl.length). This fixes that.
This commit is contained in:
parent
6901a940e7
commit
ae660d756c
@ -6,10 +6,15 @@ chai.use(function (_chai, utils) {
|
||||
// NB(directxman12): PhantomJS 1.x doesn't implement Uint8ClampedArray, so work around that
|
||||
var data = new Uint8Array(data_cl);
|
||||
var same = true;
|
||||
for (var i = 0; i < obj.length; i++) {
|
||||
if (data[i] != target_data[i]) {
|
||||
same = false;
|
||||
break;
|
||||
var len = data_cl.length;
|
||||
if (len != target_data.length) {
|
||||
same = false;
|
||||
} else {
|
||||
for (var i = 0; i < len; i++) {
|
||||
if (data[i] != target_data[i]) {
|
||||
same = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!same) {
|
||||
|
Loading…
Reference in New Issue
Block a user