Skip to content

Commit aa183cd

Browse files
committed
Adjusted test to capture the localUri adjustment appropriately.
1 parent 5f44655 commit aa183cd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

specs/lib/readResourcesSpec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,11 @@ describe("readResources", () => {
149149
it("reads absolute resource paths when allowAbsolute there is no resourceDirectory", async () => {
150150
const gltf = readGltf(boxTexturedSeparate2Path);
151151
const toAbs = (uri) =>
152-
new URL(uri, pathToFileURL(boxTexturedSeparate2Path)).toString();
152+
fileURLToPath(
153+
new URL(uri, pathToFileURL(boxTexturedSeparate2Path)).toString(),
154+
);
153155
spyOn(process.stderr, "write");
154-
// uri = file:///...
156+
// uri = /...
155157
gltf.buffers[0].uri = toAbs(gltf.buffers[0].uri);
156158
gltf.images[0].uri = toAbs(gltf.images[0].uri);
157159

@@ -167,11 +169,9 @@ describe("readResources", () => {
167169
it("reads absolute resource paths when allowAbsolute is true", async () => {
168170
const gltf = readGltf(boxTexturedSeparate2Path);
169171
const toAbs = (uri) =>
170-
fileURLToPath(
171-
new URL(uri, pathToFileURL(boxTexturedSeparate2Path)).toString(),
172-
);
172+
new URL(uri, pathToFileURL(boxTexturedSeparate2Path)).toString();
173173
spyOn(process.stderr, "write");
174-
// uri = /...
174+
// uri = file:///...
175175
gltf.buffers[0].uri = toAbs(gltf.buffers[0].uri);
176176
gltf.images[0].uri = toAbs(gltf.images[0].uri);
177177

0 commit comments

Comments
 (0)