diff --git a/specs/lib/gltfSpec.js b/specs/lib/gltfSpec.js index 84d3692..00afa61 100644 --- a/specs/lib/gltfSpec.js +++ b/specs/lib/gltfSpec.js @@ -70,7 +70,7 @@ describe('gltf', function() { it('simple gltf', function(done) { var gltf = createGltf(boxObjData); - expect(writeUris(gltf, boxGltfUrl, defaultOptions) + expect(writeUris(gltf, boxGltfUrl, path.dirname(boxGltfUrl), defaultOptions) .then(function() { expect(gltf).toEqual(boxGltf); }), done).toResolve(); @@ -79,7 +79,7 @@ describe('gltf', function() { it('multiple nodes, meshes, and primitives', function(done) { var gltf = createGltf(groupObjData); - expect(writeUris(gltf, groupGltfUrl, defaultOptions) + expect(writeUris(gltf, groupGltfUrl, path.dirname(groupGltfUrl), defaultOptions) .then(function() { expect(gltf).toEqual(groupGltf); expect(Object.keys(gltf.materials).length).toBe(3); diff --git a/specs/lib/obj2gltfSpec.js b/specs/lib/obj2gltfSpec.js index b152f9f..eda21f7 100644 --- a/specs/lib/obj2gltfSpec.js +++ b/specs/lib/obj2gltfSpec.js @@ -29,9 +29,10 @@ describe('obj2gltf', function() { .then(function() { var args = spy.calls.first().args; var options = args[2]; + expect(options.basePath).toBeDefined(); + delete options.basePath; // This will be a random temp directory expect(options).toEqual({ createDirectory : false, - basePath : path.dirname(objPath), binary : false, embed : true, embedImage : true, @@ -75,9 +76,10 @@ describe('obj2gltf', function() { .then(function() { var args = spy.calls.first().args; var options = args[2]; + expect(options.basePath).toBeDefined(); + delete options.basePath; // This will be a random temp directory expect(options).toEqual({ createDirectory : false, - basePath : path.dirname(objPath), binary : true, embed : false, embedImage : false,