Skip to content

Commit

Permalink
Fix duplicate require
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Dec 24, 2020
1 parent 7321c59 commit ed18a58
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/impro.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ var expect = require('./expect');

var childProcess = require('child_process');
var fileType = require('file-type');
var path = require('path');
var sinon = require('sinon');
var stream = require('stream');

Expand All @@ -19,10 +18,13 @@ var load = memoizeSync(function(fileName, platformsToOverride) {
Array.isArray(platformsToOverride) &&
platformsToOverride.includes(process.platform)
) {
const ext = path.extname(fileName);
fileName = [path.basename(fileName, ext), '-', process.platform, ext].join(
''
);
const ext = pathModule.extname(fileName);
fileName = [
pathModule.basename(fileName, ext),
'-',
process.platform,
ext
].join('');
}

return fs.readFileSync(
Expand Down

0 comments on commit ed18a58

Please sign in to comment.