dependents/node-filing-cabinet

Tests assertions fail on windows under vscode due to / versus \ in paths.

dazinator opened this issue · 1 comments

For example this test fails:


 it('adds the directory to the require resolution paths', function() {
        const directory = 'js/commonjs/';
        cabinet({
          partial: 'foobar',
          filename: 'js/commonjs/foo.js',
          directory: directory
        });

        assert.ok(require.main.paths.some(function(p) {
          return p.indexOf(directory) !== -1;
        }));
      });

because on windows, require.main.paths looks like this:

image

So the assertion fails becuase the slash direction in the paths doesn't match.

PR Submitted