test: resolve sky fixture URLs as native file paths

This commit is contained in:
disco committed 2026-10-28 20:18:35 -06:00
1 parent d41c7dcfce
commit 24df77bb5c
1 file changed
+2 -1
+2 -1
View File
@@ -1,6 +1,7 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import sharp from 'sharp';
import { fileURLToPath } from 'node:url';
import {
CUBE_FACES,
FACE_FILE_SUFFIX,
@@ -24,7 +25,7 @@ test('painted-out planets leave no disc brighter than the sky around them', asyn
}));
for (const face of CUBE_FACES) {
const { data, info } = await sharp(
new URL(`milkyway_${FACE_FILE_SUFFIX[face]}.webp`, SKY).pathname,
fileURLToPath(new URL(`milkyway_${FACE_FILE_SUFFIX[face]}.webp`, SKY)),
)
.raw()
.toBuffer({ resolveWithObject: true });