Skip to content

Commit

Permalink
dependents#65 - Amd Resolver test passing with aternative fs.
Browse files Browse the repository at this point in the history
  • Loading branch information
dazinator committed Mar 19, 2019
1 parent c7f7a62 commit 1de6e05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
21 changes: 7 additions & 14 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

});

Expand Down

0 comments on commit 1de6e05

Please sign in to comment.