Skip to content

Commit 11a27f6

Browse files
committed
Use Uint8Array for writeTests rgb test
With the new writeArrayBuffer defaulting to Float64 writing, the "writeTests > should write rgb data with sensible defaults" was failing on the StripByteCount, since it no longer equals 27 with a regular Array. I had switched it to the new value, 216, but decided it's likely better to not change the expect() statements when introducing changes.
1 parent ef3f355 commit 11a27f6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/geotiff.spec.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,10 @@ describe('writeTests', () => {
10901090
[0, 0, 0],
10911091
[255, 255, 255],
10921092
];
1093-
const originalValues = [originalRed, originalGreen, originalBlue];
1093+
const interleaved = originalRed.flatMap((row, rowIdx) => row.flatMap((value, colIdx) => [
1094+
value, originalGreen[rowIdx][colIdx], originalBlue[rowIdx][colIdx],
1095+
]));
1096+
const originalValues = new Uint8Array(interleaved);
10941097
const metadata = {
10951098
height: 3,
10961099
width: 3,

0 commit comments

Comments
 (0)