From 1de6e05f2a2f8b2535b1c042218b3df71a48b202 Mon Sep 17 00:00:00 2001 From: Darrell Tunnell Date: Tue, 19 Mar 2019 14:45:33 +0000 Subject: [PATCH] #65 - Amd Resolver test passing with aternative fs. --- package.json | 2 +- test/test.js | 21 +++++++-------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index b9125d9..f03ddb2 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "enhanced-resolve": "^4.1.0", "is-relative-path": "^1.0.2", "module-definition": "^3.2.0", - "module-lookup-amd": "^6.1.0", + "module-lookup-amd": "^6.2.0", "resolve": "^1.10.0", "resolve-dependency-path": "^2.0.0", "sass-lookup": "^3.0.0", diff --git a/test/test.js b/test/test.js index f8cad7a..c1e6327 100644 --- a/test/test.js +++ b/test/test.js @@ -213,26 +213,19 @@ describe('filing-cabinet', function() { const unionfs = require('unionfs'); const memfs = require('memfs'); - // mount files specified by "mockedFiles.js.ts" to "app" base directory. - var vol = memfs.Volume.fromJSON(mockedFiles.js.es6, `${volumeDir}`); + // mount files specified by "mockedFiles.js.amd" to "app" base directory. + var vol = memfs.Volume.fromJSON(mockedFiles.js.amd, `${volumeDir}`); var ufs = unionfs.ufs.use(vol); const result = cabinet({ partial: './bar', filename: 'app/foo.js', - directory: 'app', - config: { - baseUrl: './' - } + directory: '', + fileSystem: ufs, + configPath: 'app/config.js' }); - // var result = cabinet({ - // partial: './bar', - // configPath: 'amd/config.js', - // filename: 'amd/foo.js', - // fileSystem: ufs - // }); - - assert.equal(result, `${path.join(__dirname, 'amd/bar.js')}`); + var expected = path.normalize('app/bar.js'); + assert.equal(result, expected); });