mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2025-03-03 06:51:43 -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) {
|
it('simple gltf', function(done) {
|
||||||
var gltf = createGltf(boxObjData);
|
var gltf = createGltf(boxObjData);
|
||||||
expect(writeUris(gltf, boxGltfUrl, defaultOptions)
|
expect(writeUris(gltf, boxGltfUrl, path.dirname(boxGltfUrl), defaultOptions)
|
||||||
.then(function() {
|
.then(function() {
|
||||||
expect(gltf).toEqual(boxGltf);
|
expect(gltf).toEqual(boxGltf);
|
||||||
}), done).toResolve();
|
}), done).toResolve();
|
||||||
@ -79,7 +79,7 @@ describe('gltf', function() {
|
|||||||
it('multiple nodes, meshes, and primitives', function(done) {
|
it('multiple nodes, meshes, and primitives', function(done) {
|
||||||
var gltf = createGltf(groupObjData);
|
var gltf = createGltf(groupObjData);
|
||||||
|
|
||||||
expect(writeUris(gltf, groupGltfUrl, defaultOptions)
|
expect(writeUris(gltf, groupGltfUrl, path.dirname(groupGltfUrl), defaultOptions)
|
||||||
.then(function() {
|
.then(function() {
|
||||||
expect(gltf).toEqual(groupGltf);
|
expect(gltf).toEqual(groupGltf);
|
||||||
expect(Object.keys(gltf.materials).length).toBe(3);
|
expect(Object.keys(gltf.materials).length).toBe(3);
|
||||||
|
@ -29,9 +29,10 @@ describe('obj2gltf', function() {
|
|||||||
.then(function() {
|
.then(function() {
|
||||||
var args = spy.calls.first().args;
|
var args = spy.calls.first().args;
|
||||||
var options = args[2];
|
var options = args[2];
|
||||||
|
expect(options.basePath).toBeDefined();
|
||||||
|
delete options.basePath; // This will be a random temp directory
|
||||||
expect(options).toEqual({
|
expect(options).toEqual({
|
||||||
createDirectory : false,
|
createDirectory : false,
|
||||||
basePath : path.dirname(objPath),
|
|
||||||
binary : false,
|
binary : false,
|
||||||
embed : true,
|
embed : true,
|
||||||
embedImage : true,
|
embedImage : true,
|
||||||
@ -75,9 +76,10 @@ describe('obj2gltf', function() {
|
|||||||
.then(function() {
|
.then(function() {
|
||||||
var args = spy.calls.first().args;
|
var args = spy.calls.first().args;
|
||||||
var options = args[2];
|
var options = args[2];
|
||||||
|
expect(options.basePath).toBeDefined();
|
||||||
|
delete options.basePath; // This will be a random temp directory
|
||||||
expect(options).toEqual({
|
expect(options).toEqual({
|
||||||
createDirectory : false,
|
createDirectory : false,
|
||||||
basePath : path.dirname(objPath),
|
|
||||||
binary : true,
|
binary : true,
|
||||||
embed : false,
|
embed : false,
|
||||||
embedImage : false,
|
embedImage : false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user