mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2025-03-02 14:34:03 -05:00
Fix tests
This commit is contained in:
parent
d7a354b313
commit
1ccf070a6e
@ -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);
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user