diff --git a/src/Tests/OneExplorer/OneExplorer.test.ts b/src/Tests/OneExplorer/OneExplorer.test.ts index bdbaa089..fdf1697c 100644 --- a/src/Tests/OneExplorer/OneExplorer.test.ts +++ b/src/Tests/OneExplorer/OneExplorer.test.ts @@ -77,23 +77,22 @@ suite('OneExplorer', function() { }); }); - test('create a base model node with cfg', function() { + test('create a base model node outside workspace', function() { const baseModelName = 'test.tflite'; const configName = `test.cfg`; - // Write a file inside temp directory - // and get file paths inside the temp directory testBuilder.writeFileSync(baseModelName, ''); - const baseModelPath = testBuilder.getPath(baseModelName); + const baseModelPath = testBuilder.getPath(baseModelName); // in /tmp + const configPath = testBuilder.getPath(configName, 'workspace'); // in workspace + // Find a base model outside workspace by locating its absolute path testBuilder.writeFileSync( configName, ` [one-import-tflite] -input_file=${baseModelPath} +input_path=${baseModelPath} `, 'workspace'); - const configPath = testBuilder.getPath(configName, 'workspace'); // Validation { diff --git a/src/Tests/OneExplorer/OneStorage.test.ts b/src/Tests/OneExplorer/OneStorage.test.ts index 7e8668ba..eb7bd423 100644 --- a/src/Tests/OneExplorer/OneStorage.test.ts +++ b/src/Tests/OneExplorer/OneStorage.test.ts @@ -51,12 +51,13 @@ input_path=${modelName} const configPath = testBuilder.getPath(configName, 'workspace'); const modelPath = testBuilder.getPath(modelName, 'workspace'); - // Validation - { - assert.strictEqual(OneStorage.getCfgs(modelPath)?.length, 1); - assert.strictEqual(OneStorage.getCfgs(modelPath)![0], configPath); - } - }); + // Validation + { + assert.isDefined(OneStorage.getCfgs(modelPath)); + assert.strictEqual(OneStorage.getCfgs(modelPath)?.length, 1); + assert.strictEqual(OneStorage.getCfgs(modelPath)![0], configPath); + } + }); test('NEG: Returns undefined for not existing path', function() { { assert.isUndefined(OneStorage.getCfgs('invalid/path')); }