mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2025-02-07 07:22:51 -05:00
Fix test
This commit is contained in:
parent
ad0866efde
commit
5d8d3c0098
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
var fs = require('fs');
|
||||
var gltfPipeline = require('gltf-pipeline').gltfPipeline;
|
||||
var path = require('path');
|
||||
var convert = require('../../lib/convert');
|
||||
|
||||
@ -8,12 +8,13 @@ var gltfFile = './specs/data/BoxTextured/BoxTextured.gltf';
|
||||
|
||||
describe('convert', function() {
|
||||
it('converts an obj to gltf', function(done) {
|
||||
var spy = spyOn(fs, 'writeFile').and.callFake(function(file, data, callback) {
|
||||
var spy = spyOn(gltfPipeline, 'processJSONToDisk').and.callFake(function(gltf, gltfFile, options, callback) {
|
||||
callback();
|
||||
});
|
||||
|
||||
convert(objFile, gltfFile, {}, function() {
|
||||
expect(path.normalize(spy.calls.first().args[0])).toEqual(path.normalize(gltfFile));
|
||||
var args = spy.calls.first().args;
|
||||
expect(args[0]).toBeDefined();
|
||||
expect(path.normalize(args[1])).toEqual(path.normalize(gltfFile));
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user