Skip to content

Commit

Permalink
refactor: remove extra path normalize
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-agius4 authored Feb 5, 2020
1 parent cc00501 commit 659eb6d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const {main, parseArgs} = require('../src/main');
const inFile = path.normalize('./data/some/index.html');

function read(file) {
if (path.normalize(file) === path.normalize(inFile)) return `<html><head></head><body></body></html>`;
if (path.normalize(file) === inFile)
return `<html><head></head><body></body></html>`;
throw new Error(`no content for ${file}`);
}

Expand Down Expand Up @@ -318,4 +319,4 @@ describe('parseArgs', () => {
expect(assets).toEqual(["./a", "./b"]);
expect(rootDirs).toEqual(["/c/", "/d/"]);
});
});
});

0 comments on commit 659eb6d

Please sign in to comment.